Method and apparatus for encoding and decoding key value data of orientation interpolator node

ABSTRACT

A method and an apparatus for encoding key value data of an orientation interpolator representing the rotation of an object in a keyframe image are provided. The apparatus includes a rotational differential data generator which generates, using a rotational transformation value of a current keyframe and a restored rotational transformation value of a previous keyframe, a rotational differential value used to rotate the object by as much as a difference between rotational transformation applied to the object in the current keyframe by key value data and rotational transformation applied to the object in the previous keyframe by key value data, and outputs rotational differential data by quantizing the rotational differential value, a circular DPCM operator which selectively performs a linear DPCM operation or a circular DPCM operation on rotational differential data, and an entropy encoder which entropy-encodes the rotational differential data.

This application claims the priority of Korean Patent Application No.2002-70496, filed Nov. 13, 2002, in the Korean Intellectual PropertyOffice. This application also claims the benefit of U.S. ProvisionalApplication No. 60/333,130, filed Nov. 27, 2001; U.S. ProvisionalApplication No. 60/334,541, filed Dec. 3, 2001; U.S. ProvisionalApplication No. 60/342,101, filed Dec. 26, 2001; and U.S. ProvisionalApplication No. 60/369,597, filed Apr. 4, 2002. The entire contents ofthese applications are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method and an apparatus for encodingand decoding key value data of an animation, and more particularly, to amethod and an apparatus for encoding and decoding key value data of anorientation interpolator node, which are converted into quaternion byencoding and decoding differences among orientation-converted valuesapplied to an object in each keyframe.

2. Description of the Related Art

MPEG-4 BIFS, which is one of the international multimedia standards,supports a keyframe-based animation using an interpolator node havingkeys and key values of an animation.

In order to represent animation as naturally and smoothly as possibleusing such a keyframe-based animation technique, a considerable numberof keys and a considerable amount of key value data are required, andfield data between key frames are filled in by interpolation.Interpolation in a virtual reality modeling language (VRML) involveslinear or spherical interpolation.

Keys and key values approximate an original animation curve on atemporal axis. FIG. 1 is a diagram illustrating two-dimensionaltrajectories of animation data, represented by an orientationinterpolator node, in accordance with the passage of time on the surfaceof a three-dimensional sphere. As shown in FIG. 1, the conventionalMPEG-4 BIFS supports spherical linear interpolation between keyframes,and an animation path looks similar to a set of segments representingthe variation of the animation data.

In an orientation interpolator node provided by BIFS, key data indicatea predetermined moment of time on a temporal axis where an animation islocated using discontinuous numbers between −∞ and ∞. Key value datarepresent information on the rotation of an object in a synthetic imageat a predetermined moment of time indicated by key data. Information onthe rotation of the object at another predetermined moment of time,which is not represented by key data, is obtained using key datacorresponding to two moments of time, which are most adjacent to thepredetermined moment of time, by spherical linear interpolation.

In spherical linear interpolation, rotation information is representedby a rotation axis and a rotation angle. MPEG4 BIFS, like virtualreality modeling language (VRML), supports rotation informationrepresented by a rotation axis and a rotation angle using an orientationinterpolator node. When generating a smooth animation using key valuedata in spherical linear interpolation, differential values of key valuedata between keyframes are highly correlated with each other, whichcauses redundancy among data. Accordingly, it is effective to use amethod for encoding key value data using differential values of data.

MPEG-4 BIFS provides two different methods for encoding field datarepresented by keys and key value data of an orientation interpolatornode. One is a method for encoding field data using pulse codemodulation (PCM) and the other is a method for encoding field data usingdifferential pulse code modulation (DPCM) and entropy encoding.

In the method for encoding field data using PCM, only a quantizationprocess is performed on key data and key value data to be encoded. Sincethe characteristics of data to be encoded are not considered in thismethod, this method is considered ineffective. In the method forencoding field data using PCM, field data of an orientation interpolatornode are input, and key value data of the field data are converted intovalues in a quaternion space. Next, keys and key value data arequantized. Quantized field data are output in the form of binary data.In order to measure the degree to which the results of quaterniontransformation are visually distorted as compared with original fielddata, the binary data are restored into key value data consisting of arotation axis and a rotation angle. Restored field data of anorientation interpolator node are stored and then are output on ascreen. It is possible to measure the degree of visual distortion ofimages caused by a quaternion error using the restored data. Distortionof images can be calculated with Equation (1) below. $\begin{matrix}{D = {\sqrt{\left( \frac{\sum\limits_{i = 0}^{i < N}ɛ_{i}}{N} \right)^{2}} = \sqrt{\left( \frac{{\sum\limits_{i = 0}^{i <}Q_{i}} - {\hat{Q}}_{i}}{N} \right)^{2}}}} & (1)\end{matrix}$

In Equation (1), N represents the number of field data, and ε_(i)represents a differential value between encoded key value data Q_(i) andkey value data {circumflex over (Q)}_(i) restored in a quaternion space.

On the other hand, in the method for encoding field data using DPCM andentropy encoding, a correlation between successive data is considered,and thus this method is considered more effective than the method forencoding field data using PCM in terms of encoding efficiency. In thismethod, a differential value between previously restored key value dataand key value data to be encoded is calculated before a quantizationprocess, and then the differential value is quantized, thus enhancingthe encoding efficiency by taking advantage of the characteristics ofdata shown in the differential value.

FIGS. 2A and 2B are block diagrams of a MPEG4 PMFC encoder using linearDPCM and entropy encoding, and a MPEGA PMFC decoder using inverse linearDPCM and entropy decoding, respectively. A linear DPCM operator shown inFIG. 2A calculates differential data {dot over (Q)}_(i) between currentkey value data and previously restored key value data following Equation(2).{dot over (Q)} _(i) =Q _(i) −{circumflex over (Q)} _(i−1)=(q _(i,0)−{circumflex over (q)} _(i−1,0) ,q _(i,1) −{circumflex over (q)}_(i−1,1) ,q _(i,2) −{circumflex over (q)} _(i−2,2) ,q _(i,3)−{circumflex over (q)} _(i−1,3))  (2)

In Equation (2), Q_(i) represents original key value data at apredetermined moment of time (t), which are represented by a quaternion,and {circumflex over (Q)}_(i−1) represents key value data at apredetermined moment of time (t−1), which are restored from an errorcompensation circuit.

However, the encoding method performed in the apparatus for encoding keyvalue data shown in FIG. 2A does not have a high encoding efficiency. Itis possible to easily figure out what the disadvantages of the encodingmethod are by analyzing key value data, which determine the rotation ofan object in a quaternion space. Key value data are represented by aquaternion in the following equation. $\begin{matrix}{Q = \left( {{\cos\quad\theta\frac{\theta}{2}},{\frac{n_{x}}{n}\sin\quad\frac{\theta}{2}},{\frac{n_{y}}{n}\sin\quad\frac{\theta}{2}},{\frac{n_{z}}{n}\sin\quad\frac{\theta}{2}}} \right)} & (3)\end{matrix}$

For example, when components of one quaternion have the same absolutevalues as their corresponding components of another quaternion butdifferent signs in a quaternion space, as shown in Equation (3), the twoquaternions are considered the same. In other words, the two quaternionsprovide the same effects in terms of the rotational transformation of anobject in a 3D space, which means the factors that affect the rotationaltransformation of an object are a direction of a rotation axis and arotation angle, rather than the vector of the rotation axis. However,like in MPEG4 BIFS, if key value data are represented by a quaternionusing Equation (3) and a differential value is linearly calculated bycalculating differences in vectors between successive key value data,the differential value is not 0, which means that linear differentialvalues do not reflect redundancy in rotational transformation well.Accordingly, it is impossible to precisely measure the quality of imagesusing the method for measuring the distortion degree of images shown inEquation (1).

SUMMARY OF THE INVENTION

To solve the above and other problems, it is an aspect of the presentinvention to provide a method and an apparatus for encoding key valuedata of an orientation interpolator by calculating a rotationaldifferential value, which can sufficiently reflect redundancy inrotational transformation.

It is another aspect of the present invention to provide a method and anapparatus for decoding encoded key value data by encoding a rotationaldifferential value.

It is another aspect of the present invention to provide a method and anapparatus for generating rotational differential data, which are adoptedin the method and the apparatus for encoding key value data according tothe present invention.

To achieve the above as well as other aspects of the present invention,there is provided an apparatus for encoding key value data of anorientation interpolator representing rotation transformation of anobject in keyframes. The apparatus includes a rotational differentialdata generator which generates, using a rotational transformation valueof a current keyframe and a restored rotational transformation value ofa previous keyframe, a rotational differential value used to rotate theobject by as much as a difference between rotational transformationapplied to the object in the current keyframe by key value data androtational transformation applied to the object in the previous keyframeby key value data, and outputs rotational differential data byquantizing the rotational differential value, a circular DPCM operatorwhich selectively performs a linear DPCM operation or a circular DPCMoperation on rotational differential data, and an entropy encoder whichentropy-encodes the rotational differential data.

Preferably, the rotational differential data generator includes aquantizer which generates rotational differential data by quantizingthree component values of the rotational differential value, a quantizeddata adjustor which adjusts three component values of rotationaldifferential data input thereinto, an inverse quantizer which inverselyquantizes the adjusted component values, a rotational differential valuerestorer which restores one component value, which has not beenquantized, using the three inversely quantized component values and thusgenerate a restored rotational differential value, and an errormeasurement unit which measures an error between a rotationaldifferential value input into the quantizer and the restored rotationaldifferential value and outputs rotational differential data havingadjusted component values so that the error can be minimized.

Alternatively, the rotational differential data generator may include afirst quaternion multiplier which generates the rotational differentialvalue using the rotational transformation value of the current keyframeand the restored rotational transformation value of the previouskeyframe, a quantizer which generates rotational differential data byquantizing the rotational differential value, an inverse quantizer whichgenerates a restored rotational differential value by inverselyquantizing the rotational differential data, and a second quaternionmultiplier which generates a restored rotational differential value ofthe current keyframe by quaternion-multiplying the restored rotationaldifferential value by a rotational transformation value of the previouskeyframe.

To achieve the above as well as other aspects of the present invention,there is provided a method for encoding key value data of an orientationinterpolator representing the rotation of an object in each keyframe.The method includes (a) generating a rotational differential value usedto rotate the object by as much as a difference between rotationaltransformation applied to the object in the current keyframe by keyvalue data and rotational transformation applied to the object in theprevious keyframe by key value data using a restored rotationaltransformation value of the previous keyframe, generating rotationaldifferential data to be entropy-encoded by quantizing the rotationaldifferential value, and selectively performing a linear DPCM operationor a circular DPCM operation on the quantized rotational differentialvalue, and (c) entropy-encoding the rotational differential data.

Preferably, step (a) includes (a1) generating the rotationaldifferential value using a rotational transformation value of thecurrent keyframe and a restored rotational transformation value of theprevious keyframe, (a2) generating rotational differential data byquantizing the rotational differential value, (a3) generating a restoredrotational differential value by inversely quantizing the rotationaldifferential data, and (a4) generating a restored rotationaltransformation value of the current keyframe by quaternion-multiplyingthe restored rotational differential value by a rotationaltransformation value of the previous keyframe.

Preferably, step (a) includes (a1) generating rotational differentialdata by quantizing three component values of the rotational differentialvalue, (a2) adjusting three component values of the rotationaldifferential data, (a3) inversely quantizing the adjusted componentvalues, (a4) generating a restored rotational differential value byrestoring one component value using the three inversely quantizedcomponent values, and (a5) measuring an error between the rotationaldifferential value and the restored rotational differential value anddetermining rotational differential data having adjusted componentvalues so that the error can be minimized as rotational differentialdata to be entropy-encoded.

To achieve the above as well as other aspects of the present invention,there is provided an apparatus for decoding a bitstream, into which keyvalue data of an orientation interpolator representing the rotationaltransformation of an object in keyframes are encoded. The apparatusincludes an entropy decoder which generates circular-DPCMed rotationaldifferential data or quantized rotational differential data byentropy-decoding the bitstream, an inverse circular DPCM operator whichgenerates quantized rotational differential data by performing aninverse circular DPCM operation on the rotational differential datainput from the entropy decoder depending on the order of DPCM decodedfrom the bitstream, an inverse quantizer which generates rotationaldifferential data, used to rotate an object by as much as a differencebetween rotational transformation applied to the object in the currentkeyframe by key value data and rotational transformation applied to theobject in the previous keyframe by key value data, by inverselyquantizing quantized rotational differential value, and a quaternionmultiplier which generates a rotational transformation value of acurrent keyframe by quaternion-multiplying a rotational differentialvalue of the current keyframe by a decoded rotational transformationvalue of a previous keyframe.

To achieve the above as well as other aspects of the present invention,there is provided a method for decoding a bitstream, into which keyvalue data of an orientation interpolator representing the rotation ofan object in each keyframe are encoded. The method includes (a)generating circular-DPCMed rotational differential data or quantizedrotational differential data by entropy-decoding key value data from thebitstream, (b) generating rotational differential data by performing aninverse circular DPCM operation on the entropy-decoded rotationaldifferential data depending on the order of DPCM decoded from thebitstream, (c) generating a rotational differential value used to rotatethe object by as much as a difference between rotation transformationsapplied to the object by quaternion key value data of each keyframe byinversely quantizing the rotational differential data, and (d)generating a rotational transformation value of a current keyframe byquaternion-multiplying a rotational differential value of the currentkeyframe by a decoded rotational transformation value of a previouskeyframe.

To achieve the above as well as other aspects of the present invention,there is provided a bitstream, into which key value data of anorientation interpolator representing the rotation of an object in eachkeyframe are encoded. The bitstream includes rotational differentialdata entropy-encoded by quantizing a rotational differential value usedto rotate the object by as much as a difference between rotationaltransformations applied to the object by quaternion key value data ofeach of the keyframes, entropy-decoding information which comprises anentropy-decoding mode indicating an entropy-decoding method, which hasbeen performed on the rotational differential data, inverse circularDPCM information which comprises the order of inverse circular DPCMoperation indicating whether or not an inverse circular DPCM operationwill be performed on rotational-differential data entropy-decodedfollowing the entropy-decoding mode, and inverse quantization bits whichare used to restore a rotational differential value by inverselyquantizing inversely circular-DPCMed rotational differential datafollowing the order of inverse circular DPCM operation.

To achieve the above as well as other aspects of the present invention,there is provided an apparatus for generating rotational differentialdata, which generates differential data of rotational transformationvalues representing the rotation of an object in each frame. Theapparatus includes a first quaternion multiplier which generates arotational differential value used to rotate an object by as much as adifference between rotational transformation applied to the object in acurrent keyframe by a rotational transformation value of the currentframe and rotational transformation applied to the object in a previouskeyframe by a restored rotational transformation value of the previousframe, a quantization unit which generates rotational differential databy quantizing the rotational differential value, an inverse quantizationunit which generates a restored rotational differential value byinversely quantizing the rotational differential data, and a secondquaternion multiplier which generates a restored rotationaltransformation value of the current frame by quaternion-multiplying therestored rotational differential value by a rotational transformationvalue of the previous frame.

To achieve the above as well as other aspects of the present invention,there is provided a method for generating rotational differential data,which generates differential data of rotational transformation valuesrepresenting the rotation of an object in each frame. The methodincludes (a) generating a rotational differential value used to rotatethe object by as much as a difference between rotation transformationsapplied to the object in each of the frames using a rotationaltransformation value of a current frame and a restored rotationaltransformation value of a previous frame, (b) generating rotationaldifferential data by quantizing the rotational differential value, (c)generating a restored rotational differential value by inverselyquantizing the rotational differential value, and (d) generating arestored rotational transformation value of a current frame byquaternion-multiplying the restored rotational differential value by arotational transformation value of a previous frame and performing steps(a) through (d) again on the restored rotational transformation value ofthe current frame and a rotational transformation value of a next frame.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects and advantages of the present invention willbecome more apparent by describing in detail preferred embodimentsthereof with reference to the attached drawings in which:

FIG. 1 is a diagram illustrating two-dimensional trajectories ofanimation data, represented by an orientation interpolator node, inaccordance with the passage of time on the surface of athree-dimensional sphere;

FIGS. 2A and 2B are block diagrams of a MPEG-4 PMFC encoder using linearDPCM and entropy encoding and a MPEG-4 PMFC decoder using inverse linearDPCM and entropy decoding, respectively;

FIG. 3A is a block diagram of an apparatus for encoding key value dataaccording to a first embodiment of the present invention, and FIG. 3B isa block diagram of an apparatus for decoding key value data according toa first embodiment of the present invention;

FIG. 4A is a diagram illustrating a typical example of a probabilitydistribution function (PDF) in each component of a rotationaldifferential value;

FIG. 4B is an arc-tangent curve for nonlinear quantization;

FIG. 5A is an example of rotational differential data output from aquantizer according to a preferred embodiment of the present invention,FIG. 5B is a diagram illustrating the results of performing a linearDPCM operation on the differential data shown in FIG. 5A, and FIG. 5C isa diagram illustrating the results of performing a circular DPCMoperation on the linear-DPCMed differential data shown in FIG. 5B;

FIG. 6A is a diagram illustrating an example of a function SignedAAC( )used for entropy encoding, and FIG. 6B is a diagram illustrating anexample of a function UnaryAAC( ) used for entropy encoding;

FIG. 7 is a diagram illustrating a rotation direction error occurringduring encoding quaternion rotational transformation values using arotational differential value;

FIG. 8A is a block diagram of a circular DPCM operator according to asecond embodiment of the present invention, and FIG. 8B is a blockdiagram of a rotation direction error calculator shown in FIG. 8A;

FIG. 9A is a flowchart of a circular DPCM operation according to asecond embodiment of the present invention, and FIG. 9B is a flowchartillustrating the operations of a rotation direction error calculator, arotation direction error detector, and a rotation direction correctorshown in FIG. 9A;

FIG. 10A is a block diagram of a quantizer included in an apparatus forencoding key value data according to a third embodiment of the presentinvention, and FIG. 10B is a flowchart of the operation of the quantizeraccording to the third embodiment of the present invention;

FIG. 11A is a block diagram of an apparatus for decoding key value dataof an orientation interpolator according to a preferred embodiment ofthe present invention, and FIG. 11B is a flowchart of a method fordecoding key value data according to a preferred embodiment of thepresent invention;

FIG. 12 is a diagram illustrating the structure of a bitstream inputinto an entropy decoder;

FIGS. 13A through 13E are diagrams illustrating examples of SDL-languageprogram codes, by which an apparatus for decoding key value dataaccording to the present invention are realized;

FIG. 14 is a diagram illustrating an example of a method for measuringan error between an original animation path and a restored animationpath; and

FIG. 15 is a diagram for comparing the performance of a method forencoding key value data according to the present invention with theperformance of a conventional method for encoding key value data.

DETAILED DESCRIPTION OF THE INVENTION

Hereinafter, the present invention will now be described more fully withreference to the accompanying drawings, in which preferred embodimentsof the invention are shown.

FIG. 3A is a block diagram of an apparatus for encoding key value dataof an orientation interpolator node according to a first embodiment ofthe present invention. Referring to FIG. 3A, the apparatus for encodingkey value data of an orientation interpolator node according to thefirst embodiment of the present invention includes a rotational DPCMoperator 300, which calculates rotational differential values amongrotational transformation values of an object in successive keyframes,which are obtained by applying quaternion key value data of thekeyframes to their respective objects, quantizes the rotationaldifferential values, and outputs rotational differential data, acircular DPCM operator 400, which selectively performs a linear DPCMoperation and a circular DPCM operation on quantized rotationaldifferential data, an entropy encoder 450, which entropy-encodesrotational-DPCMed or circular-DPCMed rotational differential data, and akey value header encoder 500, which encodes information necessary todecode encoded key value data of an orientation interpolator node.

The rotational DPCM operator 300 includes a first quaternion multiplier310, which calculates a rotational differential value between arotational transformation value of an object in a previous keyframe anda rotational transformation value of the object in a current keyframe byquaternion-multiplying the rotational transformation value of the objectin the current keyframe by the rotational transformation value of theobject in the previous keyframe, a quantizer 340, which generatesquantized rotational differential data by non-linearly quantizing therotational differential value input from the first quaternion multiplier310, an inverse quantizer 350, which generates restored rotationaldifferential data of the object in the current keyframe by inverselyquantizing quantized rotational differential data, a second quaternionmultiplier 370, which restores the rotational transformation value ofthe object in the current keyframe by quaternion-multiplying therotational differential value of the object in the current keyframe bythe rotational transformation values of the object in previous keyframescalculated by accumulating the rotational differential data, and adelayer 390, which outputs the restored rotational transformation valueof the object in the current keyframe to the first quaternion multiplier310 when a rotational transformation value of the object in a nextkeyframe is input.

Hereinafter, a rotational DPCM operation performed in a rotational DPCMoperator according to the present invention will be described in greaterdetail.

In a linear DPCM method, which has been adopted in conventional MPEG-4PMFC, a differential value between a quaternion rotationaltransformation value Q₁ (Q₁=(q_(1,0), q_(1,1), q_(1,2), q_(1,3)))representing rotational transformation of an object in a currentkeyframe (or representing the degree to which an object in a currentkeyframe is rotationally transformed) and a quaternion rotationaltransformation value Q₂ (Q₂=(q_(2,0), q_(2,1), q_(2,2), q_(2,3)))representing rotational transformation of the object in a next keyframeis calculated following Equation (4).Q _(LinearDPCM)=(q _(1,0) −q _(2,0) , q1,1−q _(2,1) , q _(1,2) −q _(2,2), q _(1,3) −q _(2,3))  (4)

However, the linear DPCM method only calculates a differential valuebetween quaternion components, which does not reflect any meaningfulrotational differential value, i.e., an actual rotational differentialvalue. Accordingly, the linear DPCM method cannot reduce redundancyamong successive key value data to be encoded effectively. In addition,in the linear DPCM method, four components of a quaternion except forone component having the greatest value are encoded. Therefore, it isnecessary to additionally encode 2-bit long information on the onecomponent, which has not been encoded, and transmit the 2-bit longinformation to a decoder from an encoder.

In order to solve the above problem with the conventional linear DPCMmethod by reducing redundancy among successive key value data, theapparatus for encoding key value data according to the first embodimentof the present invention provides a rotational DPCM operation, in whichactual rotational differential values are considered.

When {circumflex over (x)} represents a reference vector representing areference position of an object in a current keyframe, ({circumflex over(n)}_(i−1), θ_(i−1)) represents key value data when key data are equalto k_(i−1), and ŷ_(i−1) is a displacement vector of {circumflex over(x)} obtained by rotationally transforming the object in the currentkeyframe, rotational transformation in a quaternion space can beexpressed by the following equation.Y _(i−1) =Q _(i−1) ×X ₀ ×Q _(i−1)*  (5)

In Equation (5), X₀, Y_(i−1), Q_(i−1), and Q_(i−1)* represent unitquaternions of {circumflex over (x)}, ŷ_(i−1), ({circumflex over(n)}_(i−1), θ_(i−1)), and ({circumflex over (n)}_(i−1), θ_(i−1))*,respectively. In addition, Q_(i−1)* represents a quaternion complexconjugate of Q_(i−1), and H represents quaternion multiplication.

In this manner, when key data are equal to k_(i), rotationaltransformation in a quaternion space can be expressed by the followingequation.Y _(i) =Q _(i) ×X ₀ ×Q _(i)*  (6)

A rotational differential value among successive rotationaltransformation values of successive key value data can be calculatedfollowing Equation (7).Y _(i) =Q _(i) ×X ₀ ×Q _(i) *×Y _(i−1) ×Q _(i−1) ×Q _(i) *={dot over(Q)} _(i) ×Y _(i−1) ×{dot over (Q)} _(i)*  (7)

Accordingly, a rotational differential value can be defined by thefollowing equation, which is derived from Equations (5) and (6).{dot over (Q)} _(i) =Q _(i) ×Q _(i−1)*  (8)

In order to prevent a quantization error from affecting a nextrotational differential value, the apparatus for encoding key value dataaccording to the first embodiment of the present invention redefines therotational differential value defined by Equation (8) using a rotationaltransformation value in a next keyframe and a restored rotationaltransformation value {circumflex over (Q)}*_(i−1) in a previouskeyframe, which is shown in Equation (9).{dot over (Q)} _(i) =Q _(i) ×{circumflex over (Q)}* _(i−1)  (9)

Hereinafter, a method for encoding key value data according to apreferred embodiment of the present invention will be described withreference to FIG. 3B. FIG. 3B is a flowchart of a method for encodingkey value data according to a preferred embodiment of the presentinvention.

The apparatus for encoding key value data according to the firstembodiment of the present invention receives the order of DPCM, anentropy-encoding mode, and key value data in step S300.

Next, the first quaternion multiplier 310 receives key value data Q_(i)represented by a quaternion and checks whether or not the input keyvalue data Q_(i) are first key value data Q₀ in step S305. If the inputkey value data Q_(i) are the first key value data Q₀, it means thatthere is no accumulated quaternion transformation value used forquaternion multiplication. Accordingly, the first quaternion multiplier310 outputs the input key value data Q_(i) to the quantizer 340. If theinput key value data Q_(i) are not the first key value data Q₀, thefirst quaternion multiplier 310 calculates a quaternion differentialvalue {dot over (Q)}_(i), which is a differential value between the keyvalue data of the current keyframe and the restored key value data ofthe previous keyframe, in step S310 by quaternion-multiplying (Q_(i) H{circumflex over (Q)}*_(i−1)) the restored quaternion transformationvalue {circumflex over (Q)}*_(i−1) (complex conjugate of {circumflexover (Q)}¹⁻¹) in the previous keyframe by the input key value data Q_(i)represented by a quaternion transformation value.

The quantizer 340 receives the first key value data Q₀ or the quaternionrotational differential value {dot over (Q)}_(i) from the firstquaternion multiplier 310 and quantizes the input using a predeterminednumber of quantization bits in step S330.

Since all rotational quaternion differential values are each representedby unit quaternion, a norm of a quaternion representing a rotationaldifferential value is always 1. Therefore, a component among fourcomponents of a quaternion, which has not been encoded, can be decodedusing the other three components. The apparatus for encoding key valuedata of an orientation interpolator node according to the firstembodiment of the present invention encodes only three components amongthe four components of a quaternion in order to reduce the amount ofdata to be encoded. Accordingly, the quantizer 340 quantizes only thethree components which will be encoded.

The quantizer 340 according to the present invention performs non-linearquantization rather than general linear quantization, and the reasonwill be described below with reference to FIG. 4A.

FIG. 4A is a diagram illustrating a typical example of a probabilitydistribution function (PDF) in each component of a rotationaldifferential value. As shown in FIG. 4A, component values of rotationdifferential values generally concentrate around 0, which is calledenergy compaction and means it is possible to reduce redundancy amongpieces of rotation information effectively. Accordingly, in order toquantize rotational differential values, reflecting lower componentvalues of each of the rotational differential values more sufficiently,quantization needs to be performed on the lower component values moreelaborately, and that is why the quantizer 340 according to the presentinvention performs non-linear quantization. Here, the quantizer 340 usesan arc-tangent curve in order to allot a non-linear scale factor to eachof the rotational differential values.

FIG. 4B is an arc-tangent curve used for quantization according to thepresent invention. As shown in FIG. 4B, the arc-tangent curve providesan appropriate resolution to higher input values and provides a muchhigher resolution to lower input values. The quantizer 340 quantizes arotational differential value in step S330 using a non-linear scalefunction, which is shown in the following equation. $\begin{matrix}{\begin{matrix}{{\overset{\sim}{q}}_{i} = \begin{matrix}{{floor}\quad\left( {{q_{i}^{\prime} \cdot \left( {2^{{nQBits} - 1} - 1} \right)} + 0.5} \right)} & \left( {q_{i}^{\prime} \geq 0} \right)\end{matrix}} \\{= \begin{matrix}{{- {floor}}\quad\left( {{{- q_{i}^{\prime}} \cdot \left( {2^{{nQBits} - 1} - 1} \right)} + 0.5} \right)} & \left( {q_{i}^{\prime} < 0} \right)\end{matrix}}\end{matrix}\left( {{q_{i}^{\prime} = {\frac{4}{\pi} \cdot {\tan^{- 1}\left( q_{i} \right)}}},{i = 1},2,3,{{- 1} \leq q_{i} \leq 1}} \right)} & (10)\end{matrix}$

Here, {dot over (q)}_(i) represents each component of the rotationaldifferential value input into the quantizer 340, q_(i)′ represents ascaled value of {dot over (q)}_(i), nQBits represents a predeterminednumber of quantization bits used for quantization, and floor(x)represents a function for converting an input value x into a maximuminteger of no greater than x.

The quantizer 340 performs quantization on the input rotationaldifferential value and then checks whether or not the quantizedrotational differential data correspond to last key value data to beencoded. If the quantized rotational differential data correspond to thelast key value data, the quantizer 340 outputs the quantized rotationaldifferential data to the circular DPCM operator 400. If the quantizedrotational differential data do not correspond to the last key valuedata, the quantizer 340 outputs the quantized rotational differentialdata to the inverse quantizer 350.

In step S340, the inverse quantizer 350 inversely quantizes thequantized rotational differential data input from the quantizer 340 andoutputs a restored rotational differential value in step S350.

As described above, the apparatus for encoding key value data accordingto the first embodiment of the present invention encodes only threecomponents of a quaternion representing a rotational differential valueby quantizing the three components other than the first component. Aninverse quantizer 1130 of an apparatus for decoding key value data,which is shown in FIG. 11A, and the inverse quantizer 350, which hasbeen described above, are supposed to restore the other one, which hasnot been encoded, among the four components of the rotationaldifferential value, using the three encoded components. Since allrotational differential values are each represented by a unitquaternion, the norm of a quaternion representing a rotationaldifferential value is always 1. Therefore, it is possible to restore thefirst component among the four components of the rotational differentialvalue using the following equation.{circumflex over (q)} ₀ =√{square root over (1−({circumflex over (q)} ₁² +{circumflex over (q)} ₂ ² +{circumflex over (q)} ₃ ²) ({circumflexover (q)}₀≧0)  (11)

In Equation (11), {circumflex over (q)}₁, {circumflex over (q)}₂, and{circumflex over (q)}₃ represent three restored components of arotational differential value, and {circumflex over (q)}0 represents afirst component restored using the three restored components {circumflexover (q)}₁, {circumflex over (q)}₂, and {circumflex over (q)}₃.

In order to restore the first component {circumflex over (q)}₀ followingEquation (11), the first component {circumflex over (q)}0 must have apositive value, and this condition can be satisfied by taking advantageof the characteristics of a quaternion, which appear when applying aquaternion to rotational transformation of an object in a 3D space andare shown in Equation (12).Y=Q×X×Q*=(−Q)×X×(−Q)*  (12)

Equation (12) shows that rotational transformation values Q and −Q arethe same in terms of their functions when applying rotationaltransformation to an object in a 3D space. Accordingly, if the firstcomponent of a rotational differential value in the apparatus forencoding key value data according to the first embodiment of the presentinvention has a negative value, the rotational differential value can beeasily converted into a positive number by multiplying each of thecomponents of the rotational differential value by −1. In this case,however, the sum of the square of each of the components of a restoredrotational differential value except for the first component may exceed1 due to a quantization error. In this case, {circumflex over (q)}₀cannot be determined by Equation (11) and is considered a value which isclose to 0 and is smaller than a minimum value which can be quantized bythe quantizer 340. The fact that {circumflex over (q)}₀ has such a valuemeans that the object has been rotationally transformed by as much asabout 180 degrees. Accordingly, an apparatus for decoding key value dataneeds a method for determining {circumflex over (q)}₀ while minimizingthe effect of the restored first component value {circumflex over (q)}₀on the three restored component values {circumflex over (q)}₁,{circumflex over (q)}₂, and {circumflex over (q)}₃, and the method willbe also applied to the inverse quantizer 350 of the apparatus forencoding key value data according to the first embodiment of the presentinvention. For example, the minimum value which can be quantized by thequantizer 340 and the minimum value multiplied by a predeterminedinteger may be determined as {circumflex over (q)}₀. The followingequation may be used to determine {circumflex over (q)}₀.{circumflex over (q)}₀ =a·2^(−m)  (13)

In Equation (13), ‘a’ represents an arbitrary constant, and m representsa predetermined number of quantization bits.

While 2-bit long information on each key value data is required fordecoding in the conventional MPEG4 BIFS PMFC method, the 2-bit longinformation is not necessary in the present invention, and thus thenumber of bits to be encoded can be decreased by as much as 2N whenencoding N key value data.

The restored rotational differential value output from the inversequantizer 350 is input into the second quaternion multiplier 370, andthe second quaternion multiplier 370 checks if an input keyframe is afirst keyframe to be encoded in step S360. If the input keyframe is thefirst keyframe to be encoded, the second quaternion multiplier 370accumulates the restored rotational transformation value of the firstkeyframe input from the inverse quantizer 350 ({circumflex over(Q)}₀={tilde over ({circumflex over (Q)})}₀) and outputs the accumulatedvalue to the delayer 390 in step S380.

If the input keyframe is the first keyframe to be encoded, the secondquaternion multiplier 370 restores a rotational transformation value{circumflex over (Q)}₁ of a current keyframe in step S370 byquaternion-multiplying a rotational differential value {tilde over({circumflex over (Q)})}_(i) of the current keyframe and a restoredrotational transformation value {circumflex over (Q)}_(i−1) of aprevious keyframe ({circumflex over (Q)}_(i)={tilde over ({circumflexover (Q)})}_(i)×{circumflex over (Q)}_(i−1)).

The second quaternion multiplier 370 outputs the restored rotationaltransformation value {circumflex over (Q)}_(i) of the current keyframeto the delayer 390, and then the delayer 390 keeps {circumflex over(Q)}_(i) until a rotational transformation value of a next keyframe isinput so that {circumflex over (Q)}_(i−1) can be the same as {circumflexover (Q)}_(i−1) and then outputs {circumflex over (Q)}_(i−1) to thefirst quaternion multiplier 310.

When a rotational transformation value Q_(i) of a current keyframe isinput into the first quaternion multiplier 310, the first quaternionmultiplier 310 also receives the restored rotational transformationvalue {circumflex over (Q)}_(i−1) of a previous keyframe from thedelayer 390 and generates a rotational differential value {dot over(Q)}_(i) between the rotational transformation value of the currentkeyframe and the restored rotational transformation value of theprevious keyframe in step S310 by quaternion-multiplying the restoredquaternion transformation value {circumflex over (Q)}*_(i−1) in theprevious keyframe by Q_(i). (Q_(i) H {circumflex over (Q)}*_(i−1)).

The generated rotational differential value is output to the quantizer340 and then is quantized by the quantizer 340 in step S330, asdescribed above. The quantizer 340 outputs rotational differential datagenerated by quantizing a rotational differential value to the circularDPCM operator 400 in step S340 if the input rotational differentialvalue correspond to the last key value data.

The circular DPCM operator 400 checks if the order of DPCM of thequantized rotational differential data input from the quantizer 340 is0. If the order of DPCM is 0, the circular DPCM operator 400 outputs thequantized rotational differential data to the entropy encoder 450 instep S400 without performing a linear DPCM operation and a circular DPCMoperation. If the order of DPCM is not 0, the circular DPCM operator 400performs a linear DPCM operation and a circular DPCM operation on thequantized rotational differential data in step S410.

FIG. 5A is a diagram illustrating an example of differential data outputfrom the quantizer 340, and FIG. 5B is a diagram illustrating theresults of performing a linear DPCM operation on the differential dataoutput from the quantizer 340.

As shown in FIG. 5B, as a result of a linear DPCM operation, the rangeof differential data to be encoded can be increased two times largerthan it used to be. The purpose of the performance of the circular DPCMoperation is to maintain the range of differential data within the rangeof quantized differential data.

The circular DPCM operation is performed on the assumption that amaximum value and a minimum value in a quantization range are circularlyconnected to each other. Accordingly, if differential data, which arethe results of performing linear DPCM on two consecutive quantized data,are greater than half of the maximum value in the quantization range,they can be represented by smaller values by subtracting the maximumvalue from the differential data.

If the differential data are smaller than half of the minimum value inthe quantization range, they can be represented by smaller values evenmore by adding the maximum value in the quantization range to thedifferential data.

When {tilde over (Q)}_(i) and {tilde over (Q)}_(i−1) represent quantizedrotational differential data at two successive moments of time t_(i) andt_(i−1), respectively, a linear DPCM operation is performed on the twosuccessive quantized rotational differential data {tilde over (Q)}_(i)and {tilde over (Q)}_(i−1) following Equation (14).X _(i) ={tilde over (Q)} _(i) −{tilde over (Q)} _(i−1)=({tilde over(q)}_(i,1) −{tilde over (q)} _(i−1,1) ,{tilde over (q)} _(i,2) −{tildeover (q)} _(i−1,2) ,{tilde over (q)} _(i,3) −{tilde over (q)}_(i−1,3))^(T)  (14)

In addition, a circular DPCM operation is performed on the differentialdata obtained following Equation (14), following Equation (15).{hacek over (Q)} _(i)=min(|X _(i) |, |X′ _(i)|)  (15)X′ _(i) =X _(i)−(2^(nQBits)−1) (if X_(i)≧0)X′ _(i) =X _(i)+(₂ ^(nQBits)−1) (otherwise)

In Equation (15), nQBits represents a predetermined number ofquantization bits. FIG. 5C is a diagram illustrating the results ofperforming a circular DPCM operation on the DPCMed differential datashown in FIG. 5B. As shown in FIG. 5C, the range of the circular-DPCMeddifferential data is much smaller than the range of the linear-DPCMeddifferential data.

The entropy encoder 450 receives the rotational differential data or thecircular-DPCMed rotational differential data from the circular DPCMoperator 400 depending on the order of DPCM of the rotationaldifferential data and then encodes the input differential data byremoving bit redundancy.

Referring to FIG. 3B again, the entropy encoder 450 checks an entropyencoding mode in step S450.

If the entropy encoding mode is a binary entropy encoding mode, theentropy encoder 450 encodes the input differential data using a functionSignedAAC( ) in step S460. If the entropy encoding mode is a unaryentropy encoding mode, the entropy encoder 450 encodes the inputdifferential data using a function UnaryAAC( ) in step S470.

The function SignedMC( ) is used to encode differential data using anadaptive binary arithmetic encoder, which encodes the sign and magnitudeof the differential data on each bit plane.

FIG. 6A is a diagram illustrating an example of the function SignedAAC(). Referring to FIG. 6A, when an input value is 74 and the number ofbits required for encoding the input value is 8, the sign of the inputvalue is 0 and a binary number representing the input number is 1001010.Signs and all bit planes are encoded in the following way:

First step: a binary number is encoded on every bit plane in an order offrom its most significant bit (MSB) to its least significant bit (LSB);

Second step: it is checked if the bit, which is currently being encoded,is 0;

Third step: if the bit currently being encoded is not 0, the sign of thebinary number is encoded next; and

Fourth step: the remaining bits of the binary number are encoded.

The function Unary AAC( ) converts a value to be encoded into apredetermined number of bits, which consist of a series of 0 s, a flagbit 1 indicating that the series of zeros end, and one bit representingthe sign of the value. Here, the number of zeros corresponds to themagnitude of the value.

The function Unary AAC( ) will be described more fully in the followingwith reference to FIG. 6B. For example, 256 is encoded into a series ofbits consisting of two hundred fifty six 0s, 1 which is a flag bitindicating the series of 0s ends, and 0 which represents the sign of256, i.e., a plus sign by the function Unary AAC( ). Due to Unary AAC(), redundancy among the bits representing the symbol to be encodedincreases, which enhances the efficiency of encoding the symbol.

Hereinafter, an apparatus for encoding key value data according to asecond embodiment of the present invention will be described. Theapparatus for encoding key value data according to the second embodimentof the present invention includes a means for correcting a rotationdirection error occurring during quantization as well as all theelements of the apparatus for encoding key value data according to thefirst embodiment of the present invention.

FIG. 7 is a diagram illustrating a rotation direction error generatedduring encoding quaternion rotational transformation values usingrotational differential values. The rotation direction error occursbecause the quaternion encoding method performed in the apparatus forencoding key value data according to the present invention is a lossencoding method.

In FIG. 7, when Q_(i), Q_(i−1), {circumflex over (Q)}_(i) and{circumflex over (Q)}_(i−1), represent a rotational transformation valuecurrently being applied to an object in an i-th keyframe, a rotationaltransformation value applied to the object in a previous keyframe, avalue restored from Q_(i), and a value restored from Q_(i−1),respectively, the locations of the object rotated by rotationaltransformations respectively applied by Q_(i), Q_(i−1), {circumflex over(Q)}_(i), and {circumflex over (Q)}_(i−1), may be represented by fourdifferent areas, as shown in FIG. 7.

In other words, if the object rotates from Q_(i−1) to Q_(i) along ashortest arc so that the object is located in area 1 and area 3 afterrotating by Q_(i) and Q_(i−1), the object is considered to have rotatedfrom Q_(i−1) to Q_(i) counterclockwise. Meanwhile, if the object rotatesfrom Q_(i−1) to Q_(i) along a shortest way so that the object is locatedin area 2 and area 4 after rotating by Q_(i−1) and Q_(i), the object isconsidered to have rotated from Q_(i−1) to Q_(i) clockwise.

On the other hand, if the object rotates following rotation informationwhich has been encoded and then decoded, an apparatus for decoding keyvalue data rotates the object using {circumflex over (Q)}_(i) andQ_(i−1) corresponding to Q_(i) and Q_(i−1), respectively. Accordingly,if the relative location of the object rotated by {circumflex over(Q)}_(i) with respect to the location of the object rotated by{circumflex over (Q)}_(i−1) is area 2 or 3 {circumflex over (Q)}_(i−1),the object rotates counterclockwise. If the relative location of theobject rotated by {circumflex over (Q)}_(i) with respect to the locationof the object rotated by {circumflex over (Q)}_(i−1) is area 1 or 4, theobject rotates clockwise. In areas 1 and 2, the rotation direction ofthe object when using an original rotational transformation value may beopposite to the rotation direction of the object when using a decodedrotational transformation value, because Q_(i) and {circumflex over(Q)}_(i) are different due to loss encoding, which is performed toencode quaternion rotational transformation values. In order to solvethis problem, it is required to minimize the degree to which the objectrotates in a wrong direction, which is opposite to a desired direction,or to correct the rotation direction of the object when the objectrotates in a wrong direction so that the object rotate in a desireddirection. In the present invention, the method for correcting therotation direction of the object so as to make the object rotate in adesired direction is adopted.

Referring to FIG. 7 again, the concept of correction of a rotationdirection error according to the present invention will be describedbriefly in the following. If a rotation direction error, like thephenomenon occurring in areas 1 and 2, is detected, quaternionrotational differential values to be encoded are controlled so as torotate in a right direction, in which case the inconsistency in rotationdirections still occurs in area 2. However, in area 2, unlike in area 1,differences between original quaternion values and restored quaternionvalues are relatively small. Accordingly, rotation direction correctionaccording to the second embodiment of the present invention is performedon only area 1.

Hereinafter, the apparatus for encoding key value data, which performsrotation direction correction, according to the second embodiment of thepresent invention will be described with reference to FIGS. 8A through9B. The apparatus for encoding key value data according to the secondembodiment of the present invention has almost the same structure as theapparatus for encoding key value data according to the first embodimentof the present invention. The only difference between them is thestructure of a rotational DPCM operator, and thus only the structure ofa rotational DPCM operator in the apparatus for encoding key value dataaccording to the second embodiment of the present invention willdescribed in the following.

FIG. 8A is a block diagram of a rotational DPCM operator 800 accordingto the second embodiment of the present invention, and FIG. 8B is ablock diagram of a rotation direction error calculator 820 shown in FIG.8A.

Referring to FIG. 8A, the rotational DPCM operator 800 includes arotation direction error calculator 820, which receives a rotationaltransformation value of an object in a current keyframe and a restoredrotational transformation value of the object in a previous keyframe andcalculates rotation direction errors, a rotation direction errordetector 830, which detects based on the rotation direction errors inputfrom the rotation direction error calculator 820 whether or not an errorsufficient to change the rotation direction of the object has occurredduring decoding, a rotation direction corrector 815, which corrects andoutputs a rotational differential value input from the first quaternionmultiplier 810 so that the object, which is located already rotatedfollowing a decoded rotational transformation value of the previouskeyframe, can rotate further by as much as 180 degrees in an originalrotation direction, and a rotation direction selector 835, which selectsthe rotational differential value input from the rotation directioncorrector 815 or the rotational differential value input from the firstquaternion multiplier 810 depending on a value input from the rotationdirection error detector 830 and outputs the selected value to thequantizer 840.

Referring to FIG. 8B, the rotation direction error calculator 820 shownin FIG. 8A includes a delayer 822, which stores an input rotationaltransformation value until a rotational transformation value of a nextkeyframe is input, a third quaternion multiplier 824, which receives theinput rotational transformation value and a rotational transformationvalue of a previous keyframe output from the delayer 822 and calculatesa rotational differential value between the input rotationaltransformation value and the rotational transformation value of theprevious keyframe by quaternion multiplication, a fourth quaternionmultiplier 826, which calculates a rotational differential value betweenthe rotational transformation value of the previous keyframe output fromthe delayer 822 and the restored rotational transformation value of theprevious keyframe, and a fifth quaternion multiplier 828, whichcalculates between the input rotational transformation value and therestored rotational transformation value of the previous keyframe.

Hereinafter, a rotational DPCM operation according to a secondembodiment of the present invention will be described in greater detailwith reference to FIG. 9A.

Key value data Q_(i) of an orientation interpolator node, which areabout to be encoded, are input into the first quaternion multiplier 810and the rotation direction error calculator 820 of the rotational DPCMoperator 800 in step S900.

The first quaternion multiplier 810, like the first quaternionmultiplier in the apparatus for encoding key value data according to thefirst embodiment of the present invention, generates a rotationaldifferential value {dot over (Q)}_(i) by quaternion-multiplying(Q_(i)×{circumflex over (Q)}*_(i−1)) an input rotational transformationvalue of a current keyframe by a restored rotational transformationvalue of a previous keyframe input from the second quaternion multiplier870 and outputs the generated rotational differential value {dot over(Q)}_(i) to the rotation direction corrector 815 and the rotationdirection selector 835 in step S910.

The rotation direction corrector 815 corrects a rotational differentialvalue input thereinto following Equation (16) and outputs the correctedrotational differential value Q_(s) to the rotation direction selector835. The rotation direction error calculator 820 receives the rotationaltransformation value Q_(i) of the current keyframe and the restoredrotational transformation value {circumflex over (Q)}_(i−1) of theprevious keyframe input from the second quaternion multiplier 870 andcalculates rotational transformation values Q_(A), Q_(B), and Q_(C),which will be described later. The rotation direction error detector 830detects using the rotational differential value input from the rotationdirection error calculator 820 whether or not a rotation direction errorhas occurred and outputs the result of the detection to the rotationdirection selector 835 in step S920. $\begin{matrix}{Q_{s} = \begin{pmatrix}{\delta_{T}} \\{{- \frac{1}{\sqrt{\left( q_{R,1} \right)^{2} + \left( q_{R,2} \right)^{2} + \left( q_{R,3} \right)^{2}}}}q_{R,1}} \\{{- \frac{1}{\sqrt{\left( q_{R,1} \right)^{2} + \left( q_{R,2} \right)^{2} + \left( q_{R,3} \right)^{2}}}}q_{R,2}} \\{{- \frac{1}{\sqrt{\left( q_{R,1} \right)^{2} + \left( q_{R,2} \right)^{2} + \left( q_{R,3} \right)^{2}}}}q_{R,3}}\end{pmatrix}} & (16)\end{matrix}$

In Equation (16), δ_(T) represents a constant very close to 0, and(q_(R,0), q_(R,1), q_(R,2) q_(R,3))^(T) represents the rotationaldifferential value {dot over (Q)}_(i) output from the first quaternionmultiplier 810. The rotation direction error calculator 820, therotation direction error detector 830, and the rotation directioncorrector 815 will be described later with reference to FIG. 9B.

The rotation direction selector 835 checks whether or not a rotationdirection error has occurred so that the object rotates in the oppositedirection to a desired direction when decoding an encoded key value datausing a logic value input from the rotation direction error detector830. If a rotation direction error has not occurred, the rotationdirection selector 835 outputs the rotation differential value inputfrom the first quaternion multiplier 810 to the quantizer 840 in stepS930. If a rotation direction error has occurred, the rotation directionselector 835 outputs the corrected rotational differential value inputfrom the rotation direction corrector 815 in step S930.

The quantizer 840 quantizes the original rotational differential data{dot over (Q)}_(i) or the corrected rotational differential data Q_(s)in steps S940 and 950 in the same quantization method as in the firstembodiment of the present invention.

The quantizer 840 checks whether or not quantized rotationaldifferential data {tilde over (Q)}_(i) belong to the last key value datain step S960. If the quantized rotational differential data {tilde over(Q)}_(i) correspond to the last key value data, the quantizer 840outputs the quantized rotational differential data {tilde over (Q)}_(i)to a circular DPCM operator 400 in step S970. If the quantizedrotational differential data {tilde over (Q)}_(i) do not correspond tothe last key value data, the quantizer 840 outputs the quantizedrotational differential data {tilde over (Q)}_(i) to the inversequantizer 850.

The inverse quantizer 850 inversely quantizes the quantized rotationaldifferential data {tilde over (Q)}_(i) in the same inverse quantizationmethod as in the first embodiment of the present invention and outputsrestored rotational differential data {tilde over ({circumflex over(Q)})}_(i) to the second quaternion multiplier 870 in step S980.

The second quaternion multiplier 870 generates a restored rotationalconersion value {circumflex over (Q)}_(i) of a current keyframe byquaternion-multiplying the restored rotational differential value {tildeover ({circumflex over (Q)})}_(i) by a rotational transformation value{circumflex over (Q)}_(i−1) of a previous keyframe. The secondquaternion multiplier 870 outputs a rotational transformation value of acurrent keyframe to the first quaternion multiplier 810 and the rotationdirection error calculator 820 via the delayer 890 in step S990.

Hereinafter, the operations of the rotation direction error calculator820, the rotation direction error detector 830, and the rotationdirection corrector 815 will be described with reference to FIG. 9B.

The rotation direction error calculator 820 calculates rotationaldifferential values corresponding to areas 2 through 4, which have beendescribed above with reference to FIG. 7.

The rotation direction error calculator 820 receives a rotationtransformation value, which corresponds to key value data of a keyframeto be encoded, receives a restored rotational transformation value of aprevious keyframe prior to the current keyframe, and calculates arotation direction error in step S922.

The rotational transformation value corresponding to the key value dataof an orientation interpolator of the current keyframe are directlyinput into the third quaternion multiplier 824 and the fifth quaternionmultiplier 828 and are input into the fourth quaternion multiplier 826via the delayer 822 when a rotational transformation value of a nextkeyframe is input. In addition, the restored rotational transformationvalue of the previous keyframe output from the second quaternionmultiplier 870 is input into the fourth quaternion multiplier 826 andthe fifth quaternion multiplier 828.

The third quaternion multiplier 824 generates the rotationaldifferential value Q_(A) by quaternion-multiplying(Q_(A)=Q_(i)×Q*_(i−1)) the rotational transformation value of thecurrent keyframe by the rotational transformation value of the previouskeyframe and outputs Q_(A) to the rotation direction error detector 830.The rotational differential value Q_(A) represents an original rotationdirection of an object during a time interval [t_(i−1), t_(i)].

The fourth quaternion multiplier 826 generates the rotationaldifferential value Q_(B) by quaternion-multiplying(Q_(B)=Q_(i−1)×{circumflex over (Q)}*_(i−1)) the rotationaltransformation value of the previous keyframe by the restored rotationaltransformation value of the previous keyframe and outputs Q_(B) to therotation direction error detector 830. The rotational differential valueQ_(B) calculated by the fourth quaternion multiplier 826 represents therotation direction error and rotation direction of an object, which areaffected by a quantization error, at a predetermined moment of timet_(i−1) and corresponds to area 2 shown in FIG. 7.

The fifth quaternion multiplier 828 generates the rotationaldifferential value Q_(C) by quaternion-multiplying(Q_(C)=Q_(i)×{circumflex over (Q)}*_(i−1)) the rotational transformationvalue of the current keyframe by the restored rotational transformationvalue of the previous keyframe and outputs Q_(C) to the rotationdirection error detector 830. The rotational differential value Q_(C)calculated by the fifth quaternion multiplier 828 represents arotational differential value to be encoded at the predetermined momentof time t_(i) and corresponds to area 4 shown in FIG. 7.

The rotation direction error detector 830 checks using the rotationaldifferential values Q_(A), Q_(B), and Q_(C) input from the rotationdirection error calculator 820 whether or not the object rotates in anopposition direction to an original direction in the process of decodingencoded key value data in step S924. For doing this, the rotationdirection error detector 830 checks whether or not the rotationaldifferential values Q_(A), Q_(B), and Q_(C) satisfy Inequalities (17)through (21). First of all, the rotation direction error detector 830checks if the rotational differential values Q_(A) and Q_(C) satisfyInequality (17). $\begin{matrix}{{\begin{pmatrix}q_{A,1} \\q_{A,2} \\q_{A,3}\end{pmatrix} \cdot \begin{pmatrix}q_{C,1} \\q_{C,2} \\q_{C,3}\end{pmatrix}} < 0} & (17)\end{matrix}$

In Inequality (17), when the rotational differential value Q_(A) inputfrom the rotation direction error calculator 820 is expressed byQ_(A)=(q_(A,0), q_(A,1), q_(A,2), q_(A,3))^(T), $\begin{pmatrix}q_{A,1} \\q_{A,2} \\q_{A,3}\end{pmatrix}\quad$represents a three-dimensional vector (q_(A,1), q_(A,2), q_(A,3))^(T)consisting of the four components q_(A,0), q_(A,1), q_(A,2), and q_(A,3)of Q_(A) except for the first component q_(A,0). $\begin{pmatrix}q_{C,1} \\q_{C,2} \\q_{C,3}\end{pmatrix}\quad$represents a three-dimensional vector (q_(C,1), q_(C,2), q_(C,3))^(T)consisting of the four components q_(C,0), q_(C,1), q_(C,2,) and q_(C,3)of Q_(C) except for the first component q_(C,0). Inequality (17) shows acondition that a inner product of the two 3D vectors (q_(A,1), q_(A,2),q_(A,3))^(T) and (q_(C,1), q_(C,2), q_(C,3))^(T) is smaller than 0.

If the inner product in Inequality (17) is smaller than 0, the rotationdirection of an object when using Q_(A) is opposite to the rotationdirection of the object when using Q_(C). When the inner product issmaller than 0, a value of a logic expression shown in Inequality (17)is set as ‘true’. When the inner product is greater than 0, the value ofthe logic expression is set as ‘false’. $\begin{matrix}{{\begin{pmatrix}q_{B,1} \\q_{B,2} \\q_{B,3}\end{pmatrix} \cdot \begin{pmatrix}q_{C,1} \\q_{C,2} \\q_{C,3}\end{pmatrix}} < 0} & (18)\end{matrix}$

In Inequality (18), when the rotational differential value Q_(B) inputfrom the rotation direction error calculator 820 is expressed byQ_(B)=(q_(B,0), q_(B,1), q_(B,2), q_(B,3))^(T) $\begin{pmatrix}q_{B,1} \\q_{B,2} \\q_{B,3}\end{pmatrix}\quad$represents a three-dimensional vector (q_(B,1), q_(B,2), q_(B,3))^(T)consisting of the four components q_(B,0), q_(B,1), q_(B,2), and q_(B,3)of Q_(B) except for the first component q_(B,0). $\begin{pmatrix}q_{C,1} \\q_{C,2} \\q_{C,3}\end{pmatrix}\quad$represents a three-dimensional vector (q_(C,1), q_(C,2), q_(C,3))^(T)consisting of the four components q_(C,0), q_(C,1), q_(C,2,) and q_(C,3)of Q_(C) except for the first component q_(C,0). Inequality (18) shows acondition that a inner product of the two 3D vectors (q_(B,1), q_(B,2),q_(B,3))^(T) and (q_(C,1), q_(C,2), q_(C,3))^(T) is smaller than 0.

If the inner product of in Inequality (18) is smaller than 0, therotation direction of an object when using Q_(B) is opposite to therotation direction of the object when using Q_(C). When the innerproduct is smaller than 0, a value of a logic expression shown inInequality (18) is set as ‘true’. When the inner product is greater than0, the value of the logic expression is set as ‘false’.A _(TH)<2 cos⁻¹ |q _(A,0)  (19)

In Inequality (19), q_(A,0) represents the first component of therotational differential value Q_(A), and A_(TH) is set to apredetermined constant close to 0. When in Inequality (19),2cos⁻¹|q_(A,0)| is greater than A_(TH), a value of a logic expressionshown in Inequality (19) is defined as ‘true’. When 2cos⁻¹|q_(A,0)| isnot greater than A_(TH), the value of the logic expression is defined as‘false’. When Inequality (19) is set as ‘false’, it means that arotation angle θ (=2cos⁻¹q_(A,0)|) smaller than the predeterminedconstant A_(TH) can be ignored when realizing an apparatus for encodingkey value data according to the present invention. Even though thereexists as much a rotation direction error as the rotation angle θ, therotation direction error does not cause severely distorted images tohuman eyes, especially when using an error measurement method proposedby the present invention.A_(TH)<²cos⁻¹q_(B,0)|  (20)

In Inequality (20), q_(B,0) represents the first component of therotational differential value Q_(B), and A_(TH) is the same as thecorresponding one in Inequality (19). When in Inequality (20),2cos⁻¹|q_(B,0)| is greater than A_(TH), a value of a logic expressionshown in Inequality (20) is defined as ‘true’. When 2cos⁻¹|q_(B,0)| isnot greater than A_(TH), the value of the logic expression is defined as‘false’.A_(TH)<2cos⁻¹|q_(C,0)|  (21)

In Inequality (21), q_(C,0) represents the first component of therotational differential value Q_(C), and A_(TH) is the same as thecorresponding one in Inequality (19). When in Inequality (21),2cos⁻¹q_(C,0)| is greater than A_(TH), a value of a logic expressionshown in Inequality (21) is defined as ‘true’. When 2cos⁻¹q_(C,0)| isnot greater than A_(TH), the value of the logic expression is defined as‘false’.

The rotation direction error detector 830 performs an AND operation onthe logic values of Inequalities (17) through (21) and outputs theresult of the AND operation to the rotation direction selector 835.

The first quaternion multiplier 810 has two input values Q_(i) and{circumflex over (Q)}_(i−1) at a predetermined moment of time t. Thefirst quaternion multiplier 810 outputs a rotational differential valueusing the two input values Q_(i) and {circumflex over (Q)}_(i−1) . Asdescribed above, in area 1, the apparatus for decoding encoded key valuedata, which receives rotational differential data, rotates an objectclockwise. However, the object must rotate from a place where it iscurrently located after rotating by predetermined degrees indicated byQ_(i−1) to a place where it is supposed to be located after rotating bypredetermined degrees indicated by Q_(i), and thus the original rotationdirection of the object must be a counterclockwise direction.

Accordingly, the rotation direction corrector 815 corrects the rotationdirection of the object so that the object can rotate by as much as arotation angle indicated by {circumflex over (Q)}_(i−1) in the samedirection as it has rotated based on {circumflex over (Q)}_(i), as shownin FIG. 7, i.e., so that the object can rotate counterclockwise from theplace where it is currently located after rotating based on {circumflexover (Q)}_(i−1) to the place where it is supposed to be located afterrotating by as much as a rotation angle indicated by {circumflex over(Q)}_(i).

For doing this, the rotation direction corrector 815 sets up newrotation information to make the object rotate counterclockwise by asmuch as 180 degrees from a place where it is currently located afterrotating by predetermined degrees following {circumflex over (Q)}_(i−1).Accordingly, the rotation direction of the object is corrected to be thesame as the original one, and a rotation direction error can beminimized. The rotation direction corrector 815 receives the rotationaldifferential data {dot over (Q)}_(i) of the current keyframe from thefirst quaternion multiplier 810, generates rotational differential datahaving a corrected rotation direction, and outputs the correctedrotational differential data to the rotation direction selector 835 instep S926.

Referring to FIG. 9A, the rotation direction selector 835 checks if thelogic values input from the rotation direction error detector 830 aretrue in step S930. If the input logic values are true, the rotationdirection selector 835 determines that the same phenomenon as hasoccurred in area 1 shown in FIG. 7 has occurred and outputs thecorrected rotational differential value Q_(s) defined by Equation (16)to the quantizer 840 in step S940.

On the other hand, if the input logic values are false, the rotationdirection selector 835 determines that the same phenomenon as hasoccurred in area 1 has not occurred and outputs the rotationaldifferential value {dot over (Q)}_(i) input from the first quaternionmultiplier 810 to the quantizer 840 in step S950.

Hereinafter, an apparatus for encoding key value data according to athird embodiment of the present invention will be described.

Since the apparatuses for encoding key value data according to the firstand second embodiments of the present invention encodes only threecomponents among the four components of a rotational differential value,they may not be able to restore a first component value of thequaternion using Equation (11) because of a quantization error. Forexample, a first component of a restored rotational differential valuemay be an imaginary number.

In order to prevent the problem with encoding only three components of aquaternion, the apparatus for encoding key value data according to thethird embodiment of the present invention includes a quantizer, whichcan appropriately adjust three quantized component values so that whendecoding encoded key value data, the other component can be restoredinto a positive real number and distortion of images can be minimized.

The apparatus for encoding key value data according to the thirdembodiment of the present invention is the same as the apparatuses forencoding key value data according to the first or second embodiments ofthe present invention except for the structure of a quantizer, and thusonly the structure of the quantizer will be described in the following.

FIG. 10A is a block diagram of a quantizer included in an apparatus forencoding key value data according to the third embodiment of the presentinvention. Referring to FIG. 10A, a quantizer 1000 includes aquantization unit 1010, which quantizes a rotational differential valueinput thereinto, a quantization data adjustor 1020, which adjusts aquantized rotational differential value, an inverse quantizer 1030,which inversely quantizes quantized rotational differential data, arotational differential value restorer 1040, which restores allcomponent values of quantized rotational differential data by restoringa first component of the quantized rotational differential data usingthe inversely quantized components, and an error measurement unit 1050,which measures an error between a restored differential value and anoriginally input rotational differential value and renews quantizedrotational differential data.

FIG. 10B is a flowchart of the operation of the quantizer 1010.Referring to FIG. 10B, when a rotational differential value {dot over(Q)} is input from a first quaternion multiplier, the quantizer 1010quantizes the input rotational differential value {dot over (Q)} usingEquation (10) and outputs quantized rotational differential data {tildeover (Q)} to the quantization data adjustor 1020 in step S1005.

The quantization data adjustor 1020 adjusts three components of thequantized rotational differential data {tilde over (Q)} followingEquation (22) in step S1010.I _(ijk) ={tilde over (Q)}+D _(ijk) , D _(ijk)=(i,j,k,)^(T)(−d≦d wherei,j,k, and d are integers)   (22)

In Equation (22), i, j, and k are variables, which will be added torotational differential data so as to adjust the rotational differentialdata, and d is used to define the range of i, j, and k. The threeadjusted components of the quantized rotational differential data {tildeover (Q)} are output to the inverse quantizer 1030.

The inverse quantizer 1030 inversely quantizes adjusted quantizedrotational differential data I_(ijk) and outputs inversely quantizedrotational differential value {tilde over (Î)}_(ijk) (or the results ofthe inverse quantization) to the rotational differential value restorerin step S1020.

The rotational differential value restorer 1040, which receives threecomponents of the inversely quantized rotational differential value{tilde over (Î)}_(ijk) , restores a first component of rotationaldifferential data following Equation (11) and outputs a restoredrotational differential value to the error measurement unit 1050 in stepS1030.

The error measurement unit 1050 checks a first component value of arotational differential value input thereinto. If the first componentvalue is a real number, the error measurement unit 1050 performs errormeasurement. On the other hand, if the first component value is animaginary number, the method moves on to step S1060 in step S1040.

When the first component of the input rotational differential value is areal number, the error measurement unit 1050 measures an error e_(ijk)between an original rotational differential value and a restoredrotational differential value in step S1045 and checks if e_(ijk) issmaller than an adjusted error e_(i*j*k*) in step S1050. The method ofmeasuring e_(ijk) between the original rotational differential value andthe restored rotational differential value will be described later withreference to FIG. 14.

If the measured error e_(ijk) is smaller than the adjusted errore_(i*j*k*), e_(ijk) replaces e_(i*j*k*) in step S1055 and then it ischecked whether or not the variables i, j, and k belong to an adjustmentrange [−d, +d] in step S1060. If the variables i, j, and k belong to theadjustment range [−d, +d], the error measurement unit 1040 repeatedlyperforms steps S1010 through S1055. In step S1010 during each cycle ofsteps S1010 through S1055, 1 is added to second through fourthcomponents of quantized rotational differential data in a nested loopfashion.

For example, a quantized data adjustor 1020 maintains the second andthird components, tries to make the restored first component become areal value by adding a value of k to the fourth component value whilegradually increasing the value of k by continuously adding 1 to thevalue of k (−d≦k≦d) before the value of k exceeds +d, and then findsfour adjusted component values, which can minimize an error between aninput rotational differential value and a restored rotationaldifferential value.

If the value of k reaches +d, the quantized data adjustor 1020 tries tomake the restored first component become a real value by initializingthe value of k with −d and adding a value of j to the third componentvalue while increasing the value of j by adding 1 to the value of j(−d≦j≦d) and adding a value of k to the fourth component value whilegradually increasing the value of k by continuously adding 1 to thevalue of k (−d≦k≦d) before the value of k exceeds +d, and then findsfour adjusted component values, which can minimize an error between aninput rotational differential value and a restored rotationaldifferential value.

If the value of j reaches +d, the quantized data adjustor 1020 tries tomake the restored first component become a real value by initializingthe values of j and k with −d and adding a value of i to the secondcomponent value while increasing the value of i by adding 1 to the valueof i (−d≦i≦d) and adding a value of j to the third component value andadding a value of k to-the fourth component value while graduallyincreasing the value of k by continuously adding 1 to the value of k(−d≦k≦d) before the value of k exceeds +d, and then finds four adjustedcomponent values, which can minimize an error between an inputrotational differential value and a restored rotational differentialvalue.

The aforementioned process is repeated until i, j, k reach +d and thequantized data adjustor 1020 finds four adjusted component values, whichcan minimize an error between an input rotational differential value anda restored rotational differential value.

The error measurement unit 1050 checks if the adjusted error e_(i*j*k*)is smaller than a final error e_(gi*gi*gk*) in step S1070 while changingthe second through fourth component values. If e_(i*j*k*) is smallerthan e_(gi*gi*gk*), e_(i*j*k*) replaces e_(gi*gi*gk*) and quantizedrotational differential data are corrected following Equation (23) instep S1075.{tilde over (Q)}*=({tilde over (q)} ₁, {tilde over (q)}₂, {tilde over(q)}₃)^(T)+(i*,j*,k*)^(T)  (23)

Thereafter, the error measurement unit 1050 outputs the correctedrotational differential data to the quantized data adjustor 1020.

The quantized data adjustor 1020 sets the values of the variables i, j,and k to −d and performs steps S1010 through S1060 again on rotationaldifferential data input thereinto. Then, the quantized data adjustor1020 checks if there exists rotational differential data having asmaller error with the input rotational differential data than apreviously stored final error.

If the adjusted error e_(i*j*k*) is not smaller than the final errore_(gi*gi*gk*), the error measurement unit 1050 outputs quantizedrotational differential data {tilde over (Q)}^(g)*={tilde over(Q)}*=({tilde over (q)}₁*,{tilde over (q)}₂*,{tilde over (q)}₃*)corresponding to the currently stored final error e_(gi*gi*gk*) to acircular DPCM operator in step S1080.

Hereinafter, an apparatus and a method for decoding an encodedbitstream, into which key value data are encoded using the apparatus forencoding key value data according to the present invention, will bedescribed with reference to FIGS. 11A through 12.

FIG. 11A is a block diagram of an apparatus for decoding an encodedbitstream according to a preferred embodiment of the present invention.Referring to FIG. 11A, the apparatus for decoding an encoded bitstreamaccording to the present invention includes a key value header decoder1170, which decodes header information required for decoding key valuedata represented by a quaternion from an input bitstream and providesthe decoded header information to a key value data decoder 1100, anentropy decoder 1110, which generates circular-DPCMed rotationaldifferential data or quantized rotational differential data byentropy-decoding entropy-encoded key value data from the inputbitstream, an inverse circular DPCM operator 1120, which generatesquantized rotational differential data by performing an inverse circularDPCM operation on circular-DPCMed rotational differential data inputthereinto, an inverse quantizer 1130, which generates a rotationaldifferential value by inversely quantizing quantized rotationaldifferential data, and a quaternion multiplier 1140, which generates arotational transformation value of a current keyframe byquaternion-multiplying a rotational differential value of the currentkeyframe by a rotational transformation value of a previous keyframe.

FIG. 11B is a flowchart of a method for decoding key value dataaccording to a preferred embodiment of the present invention. Referringto FIG. 11B, a bitstream, into which key value data are encoded usingthe apparatus for encoding key value data according to the presentinvention, is input into the key value header decoder 1170 and theentropy decoder 1110 of the key value data decoder 1100.

The key value header decoder 1170 decodes header information requiredfor decoding key value data from the input bitstream and provides thedecoded header information to the key value data decoder 1100 in stepS1100.

In the header information, first and second intra key value dataquantized into quaternions based on the order of DPCM and a plurality offlags used to decode other key value data are encoded.

If the order of DPCM is 1 (for example, if nKVDPCMOrder, which is one ofthe plurality of flags, is set to 0), first quantized key value data areincluded in the header information as intra key value data. If aquaternion value of first inversely quantized key value data satisfies{circumflex over (Q)}₀=({circumflex over (q)}_(0,0),{circumflex over(q)}_(0,1),{circumflex over (q)}_(0,2),{circumflex over (q)}_(0,3))^(T),the first inversely quantized key value data are calculated followingEquation (24). $\begin{matrix}{{{\hat{q} - 0},{0 = {\tan\left( {\frac{\pi}{4}*\left( \frac{{firstQKV\_ S}}{2^{{nKVQBit} - 1} - 1} \right)} \right)}}}{{\hat{q}}_{0,1} = {\tan\left( {\frac{\pi}{4}*\left( {{xSign}*\frac{{firstQKV\_ X}}{2^{{nKVQBit} - 1} - 1}} \right)} \right)}}{{\hat{q}}_{0,2} = {\tan\left( {\frac{\pi}{4}*\left( {{ySign}*\frac{{firstQKV\_ Y}}{2^{{nKVQBit} - 1} - 1}} \right)} \right)}}{{\hat{q}}_{0,3} = {\tan\left( {\frac{\pi}{4}*\left( {{zSign}*\frac{{firstQKV\_ Z}}{2^{{nKVQBit} - 1} - 1}} \right)} \right)}}} & (24)\end{matrix}$

In Equation (24), xSign is 1 only when nFirstXSign in classOrilDPcMKeyvalueHeader, which will be described later, is 1 and is −1under other conditions. ySign and zSign have the same relationships withnFirstYSign and nFirstZSign, respectively, as the relationship betweenxSign and nFirstXSign.

The restored quaternion component values defined by Equation (24) areconverted into angular displacements to be used as an orientationinterpolator. Each of the angular displacements restored from the keyvalue data can be expressed by a four-dimensional vector ({circumflexover (x)}_(i),ŷ_(i),{circumflex over (z)}_(i),{circumflex over(θ)}_(i))^(T) where i represents current key data, ({circumflex over(x)}_(i), ŷ_(i), {circumflex over (z)}_(i)) represents the vector of arotation axis, and {circumflex over (θ)}_(i) represents acounterclockwise rotation angle. Accordingly, the restored quaternioncomponent values are converted into angular displacements followingEquation (25). $\begin{matrix}{{{\hat{x}}_{0} = {{\hat{q}}_{0,1}*\frac{1}{\sin\left( \frac{{\hat{\theta}}_{0}}{2} \right)}}}{{\hat{y}}_{0} = {{\hat{q}}_{0,2}*\frac{1}{\sin\left( \frac{{\hat{\theta}}_{0}}{2} \right)}}}{{\hat{z}}_{0} = {{\hat{q}}_{0,3}*\frac{1}{\sin\left( \frac{{\hat{\theta}}_{0}}{2} \right)}}}{{\hat{\theta}}_{0} = {{\arccos\left( {\hat{q}}_{0,0} \right)}*2}}} & (25)\end{matrix}$

If the order of DPCM is 2, for example, if nKVDPCMOrder is set to 1,first and second quantized key value data are included in the headerinformation. The first quantized key value data are restored in the sameway as described above. The second key value data, however, are restoredin a different method. In other words, only three components of thesecond quantized key value data are transmitted along with an encodedbitstream and their values are not intra key value data but differentialvalues ({tilde over (Q)}₁=({tilde over (q)}_(1,1),{tilde over(q)}_(1,2), {tilde over (q)}_(1,3))) with the first key value data.Supposing a quaternion representing the second key value data ofinversely quantized key value data satisfies {tilde over ({circumflexover (Q)})}₁=({tilde over ({circumflex over (q)})}_(1,0),{tilde over({circumflex over (q)})}_(1,1),{tilde over ({circumflex over(q)})}_(1,2),{tilde over ({circumflex over (q)})}_(1,3))^(T), {tildeover ({circumflex over (Q)})}₁ is calculated following Equation (26).$\begin{matrix}{{{\hat{\overset{\sim}{q}}}_{1,0} = \sqrt{1 - \left( {{\overset{\hat{\sim}}{q}}_{1,1}^{2} + {\overset{\hat{\sim}}{q}}_{1,2}^{2} + {\overset{\hat{\sim}}{q}}_{1,3}^{2}} \right)}}{{\hat{\overset{\sim}{q}}}_{1,1} = {\tan\left( {\frac{\pi}{4}*\left( {{SecondXSign}*\frac{{SecondQKV\_ X}}{2^{{nKVQBit} - 1} - 1}} \right)} \right)}}{{\hat{\overset{\sim}{q}}}_{1,2} = {\tan\left( {\frac{\pi}{4}*\left( {{SecondYSign}*\frac{{SecondQKV\_ Y}}{2^{{nKVQBit} - 1} - 1}} \right)} \right)}}{{\hat{\overset{\sim}{q}}}_{1,3} = {\tan\left( {\frac{\pi}{4}*\left( {{SecondZSign}*\frac{{SecondQKV\_ Z}}{2^{{nKVQBit} - 1} - 1}} \right)} \right)}}} & (26)\end{matrix}$

In Equation (26), secondXSign is 1 only when when nSecondXSign in classOrilDPCMKeyValueHeader is 1 and is −1 under other conditions.secondYSign and secondZSign have the same relationships withnSecondYSign and nSecondZSign, respectively as the relationship betweensecondXSign and nSecondXSign. If a quaternion {circumflex over (Q)}₁representing second inversely quantized key value data satisfies{circumflex over (Q)}₁=({circumflex over (q)}_(1,0),{circumflex over(q)}_(1,1),{circumflex over (q)}_(1,2), {circumflex over(q)}_(1,3))^(T), {circumflex over (Q)}₁ is calculated by multiplying{tilde over ({circumflex over (Q)})}₁ by {circumflex over (Q)}₀. Inother words, {circumflex over (Q)}₁={tilde over ({circumflex over(Q)})}₁×{circumflex over (Q)}₀.

The key value header decoder 1170 outputs decoded key value data anddecoded header information to the key value decoder 1100.

The entropy decoder 1110 receives a bitstream, into which differentialdata of key value data are encoded, and entropy-decodes the inputbitstream using decoding information decoded by the key value headerdecoder 1170 in steps S1120 through S1128.

FIG. 12 is a diagram illustrating the structure of a bitstream inputinto the entropy decoder 1110. In FIG. 12, supposing N(nNumberOfKeyValue) represents the number of encoded key value data, thenumber of rotational differential data of each component included in abitstream is N-1 (0, 1, . . . , nNumberOfKeyValue-2) when the order ofDPCM is 0. When the order of DPCM is 1, the number of rotationaldifferential data of each of the components included in the bitstream isN-2 (0, 1, . . . , nNumberOfKeyValue-3).

The entropy decoder 1110 receives x_keyvalue_flag, y_keyvalue_flag, andz_keyvalue_flag from the key value header decoder 1170 and checks ifx_keyvalue_flag, y_keyvalue_flag, and z_keyvalue_flag are each set to 1in step S1120.

When x_keyvalue_flag, y_keyvalue_flag, and z_keyvalue_flag are each setto 0, it is considered that all quantized key value data or alldifferential data of each component are the same as nAllKeyValues inclass OrilKeyValueCodingBit. Accordingly, the entropy decoder 1110decodes the key value data of each of the components into the same valueas nAllKeyValues input from the key value header decoder 1170 andoutputs the decoded key value data to the inverse circular DPCM operator1120 in step S1122.

If x_keyvalue_flag, y_keyvalue_flag, and z_keyvalue_flag are not set to0, for example, if x_keyvalue_flag, y_keyvalue_flag, and z_keyvalue_flagare set to 1, the entropy decoder 1110 checks an entropy decoding modeinput from the key value header decoder 1170 in order to decode eachcomponent of input key value data ( Q _(i)=( q _(i,1), q _(i,2), q_(i,3))) in step S1124.

When the entropy decoding mode is a binary decoding mode, the entropydecoder 1110 decodes an adaptive-arithmetically encoded bitstream usinga function decodeSignedAAC( ) shown in Table 1 and outputs quantizedrotational differential data to the inverse circular DPCM operator 1120in step S1126. TABLE 1 void decodeSignedAAC(int *nDecodedValue, intqstep, QState *signContext, QState *valueContext) {     int b;     b =qstep − 2;     int msb = 0;     do {         qf_decode(&msb,&valueContext[b]);         msb = msb << b;         b−−;     } while (msb== 0 && b >=0);     int sgn = 0;     int rest = 0;     if(msb != 0) {        qf_decode(&sgn, signContext);         while (b >= 0) {            int temp = 0;             qf_decode(&temp,&valueContext[b]);             rest |= (temp << b);             b−−;        }     }     if(sgn)         *nDecodedValue = −(msb+rest);    else         *nDecodedValue = (msb+rest); }

On the other hand, when the entropy decoding mode is not a binarydecoding mode, the entropy decoder 1110 decodes the input bitstreamusing a function decodeUnaryAAC( ) in step S1128. The functiondecodeUnaryAAC( ) decodes the input bitstream by consecutively reading 0until 1 is read from the bitstream, converting the number of successive0s into its absolute value, reading a bit next to the bit ‘1’, andconverting the bit into a sign bit and then outputs quantized rotationaldifferential data to the inverse circular DPCM operator 1120. An exampleof the function decodeUnaryAAC( ) is shown in Table 2. TABLE 2 voiddecodeUnaryAAC(int* nDecodedValue, QState* signContext, QState*valueContext) {     int nBits = −1;     bit bBit;     do {        qf_decode(&bBit, valueContext);         nBits++;     }while(bBit == 0);     if(nBits != 0) {         qf_decode(&bBit,signContext);         if(bBit == 0)             * nDecodedValue = nBits;    else             * nDecodedValue = −nBits;     }     else         *nDecodedValue = 0; }

A function qf_decode( ) adopted in the aforementioned functionsdecodeSignedMC( ) and decodeUnaryAAC( ) is used to read the bit 1 froman adaptive-arithmetically encoded bitstream and is defined by adocument ISO/IEC 14496-2: 1999 Coding of Audio-Visual Objects: Visual,authorized by the International Standardization Organization.

The inverse circular DPCM operator 1120 receives the entropy-decoded keyvalue data from the entropy decoder 1110 and checks the order of DPCMinput from the key value header decoder 1170. If the order of DPCM is 0,the inverse circular DPCM operator 1120 outputs decoded rotationaldifferential data {hacek over (Q)}_(i,2) to the inverse quantizer 1130in step S1130 since the entropy-decoded key value data input from theentropy decoder 1110 are quantized rotational differential data.

On the other hand, if the order of DPCM is 1, the inverse circular DPCMoperator 1120 performs an inverse circular DPCM operation in step S1135since the entropy-decoded key value data input from the entropy decoder1110 are circular-DPCMed rotational differential data.

Supposing nKVQBit represents inverse quantization bits, the inversecircular DPCM operator 1120 performs an inverse circular DPCM operationon the rotational differential data {hacek over (Q)}_(i,2) followingEquation (27) and generates quantized rotational differential data{hacek over (Q)}′_(i,2) in step S1135.{hacek over (Q)}′_(i−2) ={hacek over (Q)} _(i−2)−(2^(nKVQBit)−1) (if{hacek over (Q)} _(i−2)≧0) {hacek over (Q)} _(i−2) ={hacek over (Q)}_(i−2)+(2^(nKVQBit)−1) (if {hacek over (Q)} _(i−2)<0) (i=2, . . . ,nNumberOfKeyValue−1)  (27)

Thereafter, the inverse circular DPCM operator 1120 obtains an inverselyDPCMed value A and an inversely DPCMed value B using {hacek over(Q)}_(i−2) and {hacek over (Q)}′_(i−2), respectively, which is shown inEquation (28).A={hacek over (Q)} _(i−2) +{hacek over (Q)} _(i−1) B={hacek over (Q)}′_(i−2) +{hacek over (Q)} _(i−1)(i=2, . . . , nNumberOfKeyValue 1)  (28)

The inverse circular DPCM operator 1120 outputs B as inverse circularDPCMed data {tilde over (Q)}_(i) if B+(2^(nKVQBit−1)−1) is between 0 anda maximum value in a quantization range. On the other hand, the inversecircular DPCM operator 1120 outputs A as {tilde over (Q)}_(i) ifB+(2^(nKVQBit−1)−1) is smaller than 0 or greater than the maximum valuein the quantization range.

An example of C++ program codes, into which the aforementioned operationof the inverse circular DPCM operator 1120 is written, is shown in Table3. TABLE 3 ICDPCM(int* curIDPCMKeyValue, int deltaKeyValue, intprevICDPCMKeyValue) {     int circularDelta;     int tempIDPCMKeyValue;    prevICDPCMKeyValue += ((1 << (nKVQBit−1))−1);    if(deltaKeyValue >= 0.0)         circularDelta = deltaKeyValue − ((1<< nKVQBit)−1);     else         circularDelta = deltaKeyValue + ((1 <<nKVQBit)−1);     tempIDPCMKeyValue = circularDelta +    prevICDPCMKeyValue;     if((tempIDPCMKeyValue >= 0.0) &&(tempIDPCMKeyValue <     ((1 << nKVQBit)−1)))         *curIDPCMKeyValue= tempIDPCMKeyValue;     else         *curIDPCMKeyValue =deltaKeyValue +         prevICDPCMKeyValue;     *curIDPCMKeyValue −= ((1<< (nKVQBit−1))−1); }

The inverse quantizer 1130 receives the quantized rotationaldifferential data ({tilde over (Q)}_(i)=({tilde over (q)}_(i,1),{tildeover (q)}i,2,{tilde over (q)}_(i,3))) generated by the inverse circularDPCM operator 1120 performing an inverse circular DPCM operation,restores a rotational differential value ({tilde over ({circumflex over(Q)})}_(i)=({tilde over ({circumflex over (q)})}_(i,0),{tilde over({circumflex over (q)})}_(i,1),{tilde over ({circumflex over(q)})}_(i,2),{tilde over ({circumflex over (q)})}_(i,3))^(T)) byperforming an inverse quantization operation on {tilde over (Q)}_(i)following Equation (29), and outputs the rotational differential value{tilde over ({circumflex over (Q)})}_(i) to the quaternion multiplier1140 in step S1140. $\begin{matrix}{{{\overset{\hat{\sim}}{q}}_{i,0} = \sqrt{1 - \left( {{\overset{\hat{\sim}}{q}}_{i,1}^{2} + {\overset{\hat{\sim}}{q}}_{i,2}^{2} + {\overset{\hat{\sim}}{q}}_{i,3}^{2}} \right)}}{{\overset{\hat{\sim}}{q}}_{i,j} = {\tan\left( {\frac{\pi}{4}*\left( {{{sgn}\left( {\overset{\sim}{q}}_{i,j} \right)}*\frac{{\overset{\sim}{q}}_{i,j}}{2^{{nKVQBit} - 1} - 1}} \right)} \right)}}\left( {{i = 2},\ldots\quad,{{nNumberOfKeyValue} - 1},{j = 1},2,3} \right)} & (29)\end{matrix}$

Thereafter, the quaternion multiplier 1140 receives the rotationaldifferential value {tilde over ({circumflex over (Q)})}_(i). Thequaternion multiplier 1140 restores a rotational transformation value{circumflex over (Q)}_(i) (where {circumflex over (Q)}_(i)=({circumflexover (q)}_(i,0),{circumflex over (q)}_(i,1),{circumflex over(q)}_(i,2),{circumflex over (q)}_(i,3))^(T) of a current keyframe instep S1154 by quaternion-multiplying the input rotational differentialvalue {tilde over ({circumflex over (Q)})}_(i) by a rotationaltransformation value {circumflex over (Q)}_(i−1) of a previous keyframefollowing Equation (30).{circumflex over (Q)} _(i) ={tilde over ({circumflex over (Q)})} _(i)×{circumflex over (Q)} _(i−1)(i=2, . . . , nNumberOfKeyValue 1)  (30)

After restoring a rotational transformation value, the key value datadecoder 1100 checks if the restored rotational transformation valuecorresponds to last key value data in step S1156. If the restoredrotational transformation value does not correspond to the last keyvalue data, the key value data decoder 1100 repeatedly performs stepsS1140 through S1154. On the other hand, if the restored rotationaltransformation value is the last key value data's, the key value datadecoder 1100 outputs the restored rotational transformation value instep S1158.

If the order of DPCM is 0, the inverse circular DPCM operator 1120outputs the decoded quantized rotational differential data {hacek over(Q)}_(i) (where {hacek over (Q)}_(i)=({hacek over (q)}_(i,1),{hacek over(q)}_(i,2),{hacek over (q)}_(i,3))) to the inverse quantizer 1130. Then,the inverse quantizer 1130 generates a rotational differential value{tilde over ({circumflex over (Q)})}_(i) (where {tilde over ({circumflexover (Q)})}_(i)=({tilde over ({circumflex over (q)})}_(i,0),{tilde over({circumflex over (q)})}i,1,{tilde over ({circumflex over(q)})}i,2,{tilde over ({circumflex over (q)})}_(i,3))^(T)) by inverselyquantizing the rotational differential data {hacek over (Q)}_(i) inputfrom the inverse circular DPCM operator 1120 and outputs {tilde over({circumflex over (Q)})}_(i) to the quaternion multiplier 1140 in stepS1140. $\begin{matrix}{{{\overset{\hat{\sim}}{q}}_{i,0} = \sqrt{1 - \left( {{\overset{\hat{\sim}}{q}}_{i,1}^{2} + {\overset{\hat{\sim}}{q}}_{i,2}^{2} + {\overset{\hat{\sim}}{q}}_{i,3}^{2}} \right)}}{{\overset{\hat{\sim}}{q}}_{i,j} = {\tan\left( {\frac{\pi}{4}*\left( {{{sgn}\left( {\overset{\sim}{q}}_{i,j} \right)}*\frac{{\overset{\sim}{q}}_{i,j}}{2^{{nKVQBit} - 1} - 1}} \right)} \right)}}\left( {{i = 1},\ldots\quad,{{nNumberOfKeyValue} - 1},{j = 1},2,3} \right)} & (31)\end{matrix}$

Even when the order of DPCM is 0, the quaternion multiplier 1140restores rotational transformation values in almost the same way (stepsS1150 through S1158) as it does when the order of DPCM is not 0. Whenthe order of DPCM is not 0, the quaternion multiplier 1140 performsquaternion multiplication following Equation (32).{circumflex over (Q)} _(i) ={tilde over ({circumflex over (Q)})} _(i)×{circumflex over (Q)} _(i−1)(i=1, . . . ,nNumberOfKeyValue 1)  (32)

FIGS. 13A through 13E are diagrams illustrating examples of SDL-languageprogram codes, into which the apparatus for decoding key value dataaccording to the present invention is realized. Hereinafter, the meaningof each variable shown in FIGS. 13A through 13E will be described.

FIG. 13A is a diagram illustrating a classCompressedOrientationInterpolator. CompressedOrientationInterpolator isa top class used for reading an encoded bitstream of an orientationinterpolator. OrilKeyValueHeader and OrilDPCMKeyValue are classes forinformation on key value data corresponding to key value field data in aconventional orientation interpolator. A function qf_start( ) is used toinitialize an arithmetic decoder before reading a bitstream, into whichkey value data are encoded.

FIG. 13B is a diagram illustrating a class OrilKeyValueHeader. Themeaning of each variable used in this class is as follows. nKVQBitrepresents an inverse quantization bit size of key value data.nNumKeyValueCodingBit represents the number of key value data.nKVDPCMOrder represents the order of inverse DPCM operation used fordecoding key value data. When nKVDPCMOrder=0, an inverse circular DPCMoperation does not need to be performed. On the other hand, whennKVDPCMOrder=1, an inverse circular DPCM operation is supposed to beperformed.

FIG. 13C is a diagram illustrating a class OriDPCMKeyValueHeader. Themeaning of each variable used in this class is as follows. firstQKV_S,firstQKV_X, firstQKV_Y, and firstQKV_Z represent first values of fourcomponents s, x, y, and z, respectively, constituting a quaternion (s,x, y, z) representing quantized key value data. nFirstXSign,nFirstYSign, and nFirstZSign represent signs of firstQKV_X, firstQKV_Y,and firstQKV_Z, respectively. secondQKV_X, secondQKV_Y, and second QKV_Zrepresent second values of the three components x, y, and z,respectively, and nSecondXSign, nSecondYSign, and nSecondZSign representsigns of secondQKV_X, secondQKV_Y, and second QKV_Z, respectively.bisMoreTwoKVs indicates if there are more than two key value data to bedecoded when an inverse circular DPCM is supposed to be performed.x_keyvalue_flag, y_keyvalue_flag, and z_keyvalue_flag indicate if allquantized values of each of the components x, y, and z, respectively,are the same.

FIG. 13D is a diagram illustrating a class OrilKeyValueCodingBit. Themeaning of each variable used in this class is as follows. nKVCodingBitrepresents the number of bits used to store each component of allquaternion key value data except for intra key value data (firstQKV_S,firstQKV_X, firstQKV_Y, firstQKV_Z, second QKV_X, secondQKV_Y, andsecondQKV_Z in the class OrilDPCMKeyValueHeader) after quantization.

nAIlKeyValue represents a quantized value of each component of all keyvalue data when keyvalue_flag for each of the components is set to 0.nsign represents the sign of nAIlKeyValue. BlsUnaryAAC represents anadaptive-arithmetic quantization method used for decoding quantizedvalues of each of the components x, y, and z. If bIsUnaryAAC is set as‘true’, an unary AAC decoding function will be used. On the other hand,if bIsUnaryAAC is set as ‘false’, a binaryAAC decoding function will beused.

FIG. 13E is a diagram illustrating a class OrilDPCMKeyValue. The meaningof each value used in this class is as follows. DeltaKeyValue is used tostore quantized key value data including the three components x, y, andz in the form of quaternion. The quantized key value data stored inDeltaKeyValue are decoded from a bitstream using a functiondecodeUnaryAAc or decodeSignedAAC.

kVXSignContext, kVYSignContext, and kVZSignContext are contexts used fordecoding the three components x, y, and z of DeltaKeyValue using thefunction decodeUnaryAAC or decodeSignedAAC.

kVXUnaryContext, kVYUnaryContext, and kVZUnaryContext are contexts usedfor decoding the three components x, y, and z of DeltaKeyValue using thefunction decodeUnaryAAC.

KVXContext, kVYContext, and kVZContext are contexts used for decodingthe three components x, y, and z of DeltaKeyValue using the functiondecodeSignedAAC.

Hereinafter, a method of measuring an error between an originalrotational differential value and a rotational differential valuerestored by inversely quantizing a quantized rotational differentialvalue in the error measurement unit 1050 included in a quantizer 1000according to a third embodiment of the present invention will bedescribed.

The method of measuring an error between an original rotationaldifferential value and a restored rotational differential valueaccording to the present invention can also be used for measuring anerror between key value data of an orientation interpolator beforeencoding and key value data of the orientation interpolator obtained bydecoding encoded key value data. Accordingly, in the followingdescription of the error measurement method according to the presentinvention, the original rotational differential value and the restoredrotational differential value will correspond to the original key valuedata before encoding and the key value data obtained by decoding encodedkey value data, respectively.

In the process of encoding key value data of an orientationinterpolator, an error occurs between original key value data andrestored key value data during quantization. Here, the error between theoriginal key value data and the restored key value data is defined bythe difference between a rotation angle obtained using the original keyvalue data and a rotation angle obtained from the restored key valuedata.

In other words, supposing that one key value datum included in anorientation interpolator node and its restored key value datum in adecoder are referred to as ({right arrow over (r)}, θ) and ({right arrowover (r)}, {circumflex over (θ)}), respectively, where {right arrow over(r)} represents a rotation axis, and θ represents a rotation angle andsatisfies θ∈[−π,π] and that an object in a three-dimensional space ismoved from an arbitrary position {right arrow over (x)} to an arbitraryposition {right arrow over (y)} and from {right arrow over (y)} to anarbitrary position {right arrow over (ŷ)} based on ({right arrow over(r)}, {circumflex over (θ)}) and ({right arrow over (r)}, {circumflexover (θ)}), respectively, by rotation transformation, a quantizationerror is the difference between {right arrow over (y)} and {right arrowover (y)} and satisfies {right arrow over (e)}({right arrow over(x)})={right arrow over (y)}−{right arrow over (ŷ. {right arrow over(x)}, {right arrow over (y)}, and {right arrow over (ŷ represented inthe form of quaternion are shown in Equation (33).X=(0,{right arrow over (x)}), Y=(0,{right arrow over (y)}), Ŷ=(0,{rightarrow over (ŷ)(33)

When quaternions representing ({right arrow over (r)}, θ) and ({rightarrow over (r)}, {circumflex over (θ)}) are referred to as Q and{circumflex over (Q)}. the following equations can be derived.Y=Q×X×Q* X=Q*×Y×Q  (34)

Here, A×B represents quaternion multiplication, and A* represents aconjugate of A. Based on Equations (33) and (34), the following equationcan be derived.Ŷ={circumflex over (Q)}×X×{circumflex over (Q)}*={circumflex over(Q)}×Q*×Y×Q×{circumflex over (Q)}*=Q _(error) ×Y×Q* _(error)  (35)

Here, Q_(error) is a value representing the relationship between {rightarrow over (y)} and {right arrow over (ŷ in terms of rotationtransformation and is defined by the following equation.Q _(error) ={circumflex over (Q)}×Q*  (36)

When a differential rotation angle between {right arrow over (y)} and{right arrow over (ŷ is referred to as θ_(error), θ_(error) can beobtained using a quaternion transformation formula and Equation (36).θ_(error)=2cos⁻¹ q _(0,error)=2cos⁻¹({circumflex over (Q)}·Q)θ_(error)∈[0,π]  (37)

Here, X represents an inner product operation. Equation (37) defines aninstantaneous quantization error occurring among all animation keyframesat a predetermined moment of time, and an instantaneous quantizationerror at a predetermined moment of time (t) can be defined by thefollowing equation in order to derive a formula for obtaining aquantization error in an entire animation interval from Equation (37).e(t)=2arccos{Q(t)·{circumflex over (Q)}(t)}  (38)

An average error E_(m) and a maximum error E_(p) can be derived byextensively applying Equation (38) to the entire keyframe interval,during which an animation is being performed using an orientationinterpolator.

Here, in order to obtain the average error E_(m), the partial sum E_(m)^(i) of errors in an interval [t_(i−1), t_(i)] must be obtained first,as shown in FIG. 14. Hereinafter, decoded key value data correspondingto original key value data Q_(i−1) and Q_(i) will be referred to as{circumflex over (Q)}_(i−1) and {circumflex over (Q)}_(i), respectively.

Due to the fact that an animation path is distorted in athree-dimensional space, the interval [t_(i−1), t_(i)] must be dividedinto two sub-intervals [t_(i−1), t_(i)″] and [t_(i)″, t_(i)] and the twosub-intervals must be calculated separately from each other. Here, letus assume that a distance between two animation paths, i.e., between agroup of values of Q_(i) and a group of values of {circumflex over(Q)}_(i) is minimized at t_(i)″ in the interval [t_(i−1), t_(i)].Instantaneous errors at t_(i−1) and t_(i) are calculated using thefollowing equations.e _(i−1)=2arccos(Q _(i−1) ·{circumflex over (Q)} _(i−1)) e_(i)=2arccos(Q _(i) ·{circumflex over (Q)} _(i))  (39)

In addition, t_(i)″ in the interval [t_(i−1), t_(i)] is proportional to$\frac{e_{i - 1}}{e_{i}},$which is shown in Equation (40). $\begin{matrix}{t_{i}^{''} = {t_{i - 1} + {\frac{e_{i - 1}}{e_{i - 1} + e_{i}}\left( {t_{i} - t_{i - 1}} \right)}}} & (40)\end{matrix}$

Intermediate quaternion values and an instantaneous error at t_(i)″ arecalculated following Equation (41). $\begin{matrix}{{Q_{i}^{''} = {{SLERP}\left( {Q_{i - 1},Q_{i},\frac{t_{i}^{''} - t_{i - 1}}{t_{i} - t_{i - 1}}} \right)}}{{\hat{Q}}_{i}^{''} = {{SLERP}\left( {{\hat{Q}}_{i - 1},{\hat{Q}}_{i},\frac{t_{i}^{''} - t_{i - 1}}{t_{i} - t_{i - 1}}} \right)}}{e_{i}^{''} = {2 \cdot {\arccos\left( {Q_{i}^{''} \cdot {\hat{Q}}_{i}^{''}} \right)}}}} & (41)\end{matrix}$

However, an instantaneous error at an arbitrary moment (t) of time isobtained following Equation (42). $\begin{matrix}{{{e(t)} = {2 \cdot {\arccos\left( {{Q(t)} \cdot {\hat{Q}(t)}} \right)}}}{{Here},{{Q(t)} = {{SLERP}\left( {Q_{i - 1},Q_{i},\frac{t - t_{i - 1}}{t_{i} - t_{i - 1}}} \right)}}}{and}{{\hat{Q}(t)} = {{{SLERP}\left( {{\hat{Q}}_{i - 1},{\hat{Q}}_{i},\frac{t - t_{i - 1}}{t_{i} - t_{i - 1}}} \right)}.}}} & (42)\end{matrix}$However, it is not easy to calculate an instantaneous error e(t) at anarbitrary moment (t) of time. Accordingly, e(t) is determined usinglinear approximation, which is shown in Approximation (43).$\begin{matrix}{{e(t)} \cong \left\{ \begin{matrix}{e_{i - 1} + {\frac{t - t_{i - 1}}{t_{i}^{''} - t_{i - 1}}\left( {e_{i}^{''} - e_{i - 1}} \right)}} & \left( {r_{i - 1} \leq t \leq t_{i}^{''}} \right) \\{e_{i}^{''} + {\frac{t - t_{i}^{''}}{t_{i} - t_{i}^{''}}*\left( {e_{i} - e_{i}^{''}} \right)}} & \left( {t_{i}^{''} \leq t \leq t_{i}} \right)\end{matrix} \right.} & (43)\end{matrix}$

The partial sum E_(m) ^(i) of errors in the interval [t_(i−1), t_(i)]and a partial sum E_(p) ^(i) of maximum errors in the interval [t_(i−1),t_(i)] can also be obtained using Approximations (43) and (44).$\begin{matrix}\left\{ \begin{matrix}{E_{p}^{i} \equiv {\max\limits_{t_{i - 1} \leq t \leq t_{i}}{{e(t)}}}} \\{E_{m}^{i} \equiv {{\int_{i - 1}^{i^{''}}{{e^{2}(t)}{\mathbb{d}t}}} + {\int_{i^{''}}^{i}{{e^{2}(t)}{\mathbb{d}t}}}}}\end{matrix} \right. & (44)\end{matrix}$

Approximation (45) can be rearranged as follows. $\begin{matrix}{\quad\left\{ \begin{matrix}{E_{p}^{i} \cong {\max\left\{ {{e_{i - 1}},{e_{i}^{''}},{e_{i}}} \right\}}} \\{E_{m}^{i} \cong {{\frac{1}{3}\left( {t_{i}^{''} - t_{i - 1}} \right)\left\{ {\left( e_{i}^{''} \right)^{2} + e_{i - 1}^{2} + {e_{i}^{''}e_{i - 1}}} \right\}} + {\frac{1}{3}\left( {t_{i} - t_{i}^{''}} \right)\left\{ {e_{i}^{2} + \left( e_{i}^{''} \right)^{2} + {e_{i}e_{i}^{''}}} \right\}}}}\end{matrix} \right.} & (45)\end{matrix}$

Finally, an average error E_(m) and a maximum error E_(p) in a timeinterval [t_(min), t_(max)] are calculated with Approximation (46)below. $\begin{matrix}{{E_{m} \cong \sqrt{\frac{1}{t_{\max} - t_{\min}}{\sum\limits_{i}E_{m}^{i}}}}{E_{p} \cong {\max\limits_{i}E_{p}^{i}}}} & (46)\end{matrix}$

Accordingly, the error measurement unit 1050 in the quantizer 1000according to the third embodiment of the present invention calculates anerror between original key value data and restored key value datafollowing Equation (37) and can measure the degree to which images aredistorted in a quaternion space due to a quantization error moreprecisely.

FIG. 15 is a graph showing the performance of the method for encodingkey value data according to the present invention compared with aconventional method for encoding key value data. As shown in FIG. 15,according to the method for encoding key value data of the presentinvention, the degree, to which images are distorted when apredetermined number of bits required for encoding are given, can belowered more considerably than in the conventional MPEG_(—)4 BIFS PMFCmethod.

The present invention can be realized as computer-readable codes writtenon a computer-readable recording medium. Here, the computer-readablerecording medium includes any kind of recording medium which can be readby a computer system. For example, the computer-readable recordingmedium includes a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk,an optical data storage, carrier wave (transmission through theInternet). The computer-readable recording medium can be decentralizedto computer systems connected over network, and a computer can read therecording medium in a decentralized way.

While this invention has been particularly shown and described withreference to preferred embodiments thereof, it will be understood bythose skilled in the art that various changes in form and details may bemade therein without departing from the spirit and scope of theinvention as defined by the appended claims.

The method for encoding and decoding key value data of an orientationinterpolator according to the present invention can effectively reduceredundancy among successive key value data to be encoded by encodingrotational differential values representing differences among rotationaltransformation values of keyframes.

In addition, according to the present invention, it is possible toprevent an object from being restored to rotate in an opposite directionto an original direction due to a quantization error by directlycorrecting the rotation direction of the object.

Moreover, since in the present invention, only second through fourthcomponents having relatively small values among four componentsconstituting a quaternion representing key value data are encoded and afirst component is restored using the second through fourth components,which are adjusted so that the first component can be restored into areal number, it is possible to considerably reduce the size of datarequired for encoding.

1. A method of decoding a bitstream in a keyframe-based graphic:animation method, the bitstream obtained by encoding key value data ofan orientation interpolator representing the rotation of an object ineach keyframe, the method comprising: restoring rotational differentialdata entropy-encoded by quantizing a rotational differential valuerepresenting the rotation of the object by as much as a differencebetween rotation transformations applied to the object by quatemion keyvalue data of each keyframe; restoring entropy-decoding informationincluding an entropy decoding mode indicating an entropy decoding methodfor the rotational differential data; restoring inverse circulardifferential pulse code modulation (DPCM) information including theorder of an inverse DPCM operation, which indicates whether to performthe inverse DPCM operation on the rotational differential dataentropy-decoded according to the entropy decoding mode; and restoringquantization information including the number of inverse quantizationbits which is used to restore the rotational differential value, byinverse-quantizing the rotational differential data on which the inversecircular DPCM operation has been performed according to the order of theinverse DPCM operation.
 2. The method of claim 1, wherein the rotationaldifferential data are encoded so that only three components of therotational differential value represented by a quatemion are quantized.3. The method of claim 2, wherein the entropy-decoding informationfurther comprises: a key value flag indicating whether or not rotationaldifferential data of each component of the key value data have the samevalue; and predetermined rotational differential data to be decoded intoeach component of rotational differential data of all key value datawhen the key value flag indicates that the rotational differential dataof each of the components of the key value data have the same value. 4.The method of claim 1, wherein the inverse circular DPCM informationfurther comprises intra rotational differential data used for performingthe inverse circular DPCM operation on the rotational differential data.